From bfc147418a695fd3bdea3b939c870a0a7d29acb7 Mon Sep 17 00:00:00 2001 From: Tim Cava Date: Mon, 11 Nov 2013 21:28:19 +0000 Subject: [PATCH] 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 --- source/names.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/names.c b/source/names.c index e385f38..28e4575 100644 --- a/source/names.c +++ b/source/names.c @@ -88,7 +88,7 @@ char * check_channel_type (char *channel) if (*channel != '!' || strlen(channel) < 6) 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; }