From 6fed90327c54f1afcbd6296e8b308a9c68de011d Mon Sep 17 00:00:00 2001 From: Tim Cava Date: Mon, 11 Nov 2013 21:20:39 +0000 Subject: [PATCH] Convert sprintf calls to snprintf. From pvaldes. git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@443 13b04d17-f746-0410-82c6-800466cd88b0 --- source/flood.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/flood.c b/source/flood.c index a7cc20c..02e93dc 100644 --- a/source/flood.c +++ b/source/flood.c @@ -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;