From 9d7c4f93d07173a95a194b51d84bb42feee2708f Mon Sep 17 00:00:00 2001 From: Tim Cava Date: Mon, 11 Nov 2013 21:28:10 +0000 Subject: [PATCH] Convert sprintf calls to snprintf. From pvaldes. git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@449 13b04d17-f746-0410-82c6-800466cd88b0 --- source/fset.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/fset.c b/source/fset.c index 36ba8d5..c633da7 100644 --- a/source/fset.c +++ b/source/fset.c @@ -808,9 +808,9 @@ int save_formats(void) FsetNumber *tmp; #if defined(__EMX__) || defined(WINNT) - sprintf(thefile, "%s/%s.fmt", get_string_var(CTOOLZ_DIR_VAR), version); + snprintf(thefile, sizeof thefile, "%s/%s.fmt", get_string_var(CTOOLZ_DIR_VAR), version); #else - sprintf(thefile, "%s/%s.formats", get_string_var(CTOOLZ_DIR_VAR), version); + snprintf(thefile, sizeof thefile, "%s/%s.formats", get_string_var(CTOOLZ_DIR_VAR), version); #endif p = expand_twiddle(thefile); outfile = fopen(p, "w");