From d264efa5d842a79d9601ed966e16fec4c39706b7 Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Tue, 8 Apr 2003 11:50:54 +0000 Subject: [PATCH] Fixed stack overflow bug, #138. --- apps/irssi/src/silc/core/client_ops.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/irssi/src/silc/core/client_ops.c b/apps/irssi/src/silc/core/client_ops.c index 5eaf39bd..21da8653 100644 --- a/apps/irssi/src/silc/core/client_ops.c +++ b/apps/irssi/src/silc/core/client_ops.c @@ -1087,7 +1087,7 @@ void silc_connect(SilcClient client, SilcClientConnection conn, /* Called to indicate that connection was disconnected to the server. */ void silc_disconnect(SilcClient client, SilcClientConnection conn, - SilcStatus status, const char *message) + SilcStatus status, const char *message) { SILC_SERVER_REC *server = conn->context; @@ -1475,9 +1475,9 @@ silc_command_reply(SilcClient client, SilcClientConnection conn, char *name = silc_channel_get_name(entry, &name_len); if (m) - strncat(buf, m, strlen(m)); - strncat(buf, name, name_len); - strncat(buf, " ", 1); + silc_strncat(buf, sizeof(buf) - 1, m, strlen(m)); + silc_strncat(buf, sizeof(buf) - 1, name, name_len); + silc_strncat(buf, sizeof(buf) - 1, " ", 1); silc_free(m); } -- 2.43.0