[Scummvm-cvs-logs] CVS: scummvm/tools convbdf.c,1.2,1.3 md5table.c,1.3,1.4

Jonathan Gray khalek at users.sourceforge.net
Fri Apr 8 18:53:14 CEST 2005


Update of /cvsroot/scummvm/scummvm/tools
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26313/tools

Modified Files:
	convbdf.c md5table.c 
Log Message:
Remove usage of vsprintf in favour of vsnprintf and make
more use of STRINGBUFLEN.  Some ports may need a new stub for
this, discussed with Chrilith.


Index: convbdf.c
===================================================================
RCS file: /cvsroot/scummvm/scummvm/tools/convbdf.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- convbdf.c	7 Apr 2005 13:00:56 -0000	1.2
+++ convbdf.c	9 Apr 2005 01:52:43 -0000	1.3
@@ -101,7 +101,7 @@
 	va_list va;
 
 	va_start(va, s);
-	vsprintf(buf, s, va);
+	vsnprintf(buf, 1024, s, va);
 	va_end(va);
 
 	fprintf(stderr, "ERROR: %s!\n", buf);
@@ -114,7 +114,7 @@
 	va_list va;
 
 	va_start(va, s);
-	vsprintf(buf, s, va);
+	vsnprintf(buf, 1024, s, va);
 	va_end(va);
 
 	fprintf(stderr, "WARNING: %s!\n", buf);

Index: md5table.c
===================================================================
RCS file: /cvsroot/scummvm/scummvm/tools/md5table.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- md5table.c	30 Mar 2005 20:20:06 -0000	1.3
+++ md5table.c	9 Apr 2005 01:52:44 -0000	1.4
@@ -31,7 +31,7 @@
 	va_list va;
 
 	va_start(va, s);
-	vsprintf(buf, s, va);
+	vsnprintf(buf, 1024, s, va);
 	va_end(va);
 
 	fprintf(stderr, "ERROR: %s!\n", buf);
@@ -44,7 +44,7 @@
 	va_list va;
 
 	va_start(va, s);
-	vsprintf(buf, s, va);
+	vsnprintf(buf, 1024, s, va);
 	va_end(va);
 
 	fprintf(stderr, "WARNING: %s!\n", buf);





More information about the Scummvm-git-logs mailing list