Convert sprintf calls to snprintf. From pvaldes.

git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@450 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
Tim Cava
2013-11-11 21:28:19 +00:00
parent 9d7c4f93d0
commit bfc147418a

View File

@@ -88,7 +88,7 @@ char * check_channel_type (char *channel)
if (*channel != '!' || strlen(channel) < 6) if (*channel != '!' || strlen(channel) < 6)
return channel; return channel;
sprintf(new_channel_format, "[%.6s] %s", channel, channel + 6); snprintf(new_channel_format, sizeof new_channel_format, "[%.6s] %s", channel, channel + 6);
return new_channel_format; return new_channel_format;
} }