Use strmcpy, instead of strcpy, to initialize FSstr. Fixes a potential buffer overflow found by Coverity.

git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@302 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
Tim Cava
2013-07-31 09:28:46 +00:00
parent aefa6e71f4
commit 565621d070

View File

@@ -1162,7 +1162,7 @@ char buffer[BIG_BUFFER_SIZE+1];
add_completion_type("fsload", 3, FILE_COMPLETION);
add_timer(0, empty_string, get_dllint_var("fserv_time"), 1, impress_me, NULL, NULL, -1, "fserv");
strcpy(FSstr, cparse(FS, NULL, NULL));
strmcpy(FSstr, cparse(FS, NULL, NULL), sizeof(FSstr));
put_it("%s %s", FSstr, convert_output_format("$0 v$1 by panasync.", "%s %s", fserv_version, AUTO_VERSION));
sprintf(buffer, "$0+%s by panasync - $2 $3", fserv_version);
fset_string_var(FORMAT_VERSION_FSET, buffer);