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

@@ -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");