1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-01 07:16:37 +02:00

irc: fix size used in some snprintf

This commit is contained in:
Sebastien Helleu
2014-02-28 11:39:48 +01:00
parent 6ea8c2d83c
commit 82ade05f66
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -53,7 +53,7 @@ irc_info_create_string_with_pointer (char **string, void *pointer)
*string = malloc (64);
if (*string)
{
snprintf (*string, 64 - 1, "0x%lx", (long unsigned int)pointer);
snprintf (*string, 64, "0x%lx", (long unsigned int)pointer);
}
}
}
+1 -1
View File
@@ -2000,7 +2000,7 @@ irc_server_send_one_msg (struct t_irc_server *server, int flags,
if (pos)
pos[0] = '\0';
snprintf (buffer, sizeof (buffer) - 1, "%s\r\n", ptr_msg);
snprintf (buffer, sizeof (buffer), "%s\r\n", ptr_msg);
/* anti-flood: look whether we should queue outgoing message or not */
time_now = time (NULL);