From 9af64e244e594dd6a183220cf493f43f35b0528a Mon Sep 17 00:00:00 2001 From: Dmytro Podgornyi Date: Fri, 8 Aug 2014 18:27:02 +0300 Subject: [PATCH] examples/bot: removed non-standard strcpy_s/strcat_s strncpy/strncat must be used instead. But in this case they don't make sense, because string has enough space. --- examples/bot.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/bot.c b/examples/bot.c index a3710ac..d72bb6f 100644 --- a/examples/bot.c +++ b/examples/bot.c @@ -92,8 +92,8 @@ int message_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, void xmpp_stanza_set_name(body, "body"); replytext = malloc(strlen(" to you too!") + strlen(intext) + 1); - strcpy_s(replytext, strlen(intext) + 1, intext); - strcat_s(replytext, strlen(intext) + 1 + 12, " to you too!"); + strcpy(replytext, intext); + strcat(replytext, " to you too!"); text = xmpp_stanza_new(ctx); xmpp_stanza_set_text(text, replytext);