irc: fix size used in some snprintf
This commit is contained in:
parent
6ea8c2d83c
commit
82ade05f66
@ -53,7 +53,7 @@ irc_info_create_string_with_pointer (char **string, void *pointer)
|
|||||||
*string = malloc (64);
|
*string = malloc (64);
|
||||||
if (*string)
|
if (*string)
|
||||||
{
|
{
|
||||||
snprintf (*string, 64 - 1, "0x%lx", (long unsigned int)pointer);
|
snprintf (*string, 64, "0x%lx", (long unsigned int)pointer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2000,7 +2000,7 @@ irc_server_send_one_msg (struct t_irc_server *server, int flags,
|
|||||||
if (pos)
|
if (pos)
|
||||||
pos[0] = '\0';
|
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 */
|
/* anti-flood: look whether we should queue outgoing message or not */
|
||||||
time_now = time (NULL);
|
time_now = time (NULL);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user