From: Ron F. <ro...@us...> - 2005-10-31 12:48:27
|
Update of /cvsroot/nsclspectcl/SpecTcl/Display In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4801/Display Modified Files: griprint.cc Log Message: Fix buffer overflow problem in griprint found by D. Caussyn. Index: griprint.cc =================================================================== RCS file: /cvsroot/nsclspectcl/SpecTcl/Display/griprint.cc,v retrieving revision 5.3 retrieving revision 5.4 diff -C2 -d -r5.3 -r5.4 *** griprint.cc 22 Sep 2005 12:41:47 -0000 5.3 --- griprint.cc 31 Oct 2005 12:48:19 -0000 5.4 *************** *** 1882,1887 **** } strcat(GriCmd, buf); ! char tbuf[25]; ! sprintf(tbuf, "rm -f %s; rm -f %s", cmd_file, cmd_root.c_str()); strcat(GriCmd, tbuf); } --- 1882,1887 ---- } strcat(GriCmd, buf); ! char tbuf[100]; ! snprintf(tbuf, sizeof(tbuf), "rm -f %s; rm -f %s", cmd_file, cmd_root.c_str()); strcat(GriCmd, tbuf); } |