Use snprintf rather than sprintf. From pvaldes.

git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@431 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
Tim Cava
2013-11-07 02:41:16 +00:00
parent 590ae4c685
commit 276fd24258
41 changed files with 623 additions and 222 deletions

View File

@@ -535,12 +535,12 @@ int kick_on_flood = 1;
if (!ignoretime)
return 0;
uh = clear_server_flags(userhost);
sprintf(tmp, "*!*%s", uh);
snprintf(tmp, sizeof tmp, "*!*%s", uh);
old_window_display = window_display;
window_display = 0;
ignore_nickname(tmp, ignore_type(type, strlen(type)), 0);
window_display = old_window_display;
sprintf(tmp, "%d ^IGNORE *!*%s NONE", ignoretime, uh);
snprintf(tmp, sizeof tmp, "%d ^IGNORE *!*%s NONE", ignoretime, uh);
timercmd("TIMER", tmp, NULL, NULL);
bitchsay("Auto-ignoring %s for %d minutes [\002%s\002 flood]", nick, ignoretime/60, type);
return 1;