SOURCES: texinfo-segv.patch - use snprintf
sparky
sparky at pld-linux.org
Mon Nov 3 23:53:56 CET 2008
Author: sparky Date: Mon Nov 3 22:53:56 2008 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- use snprintf
---- Files affected:
SOURCES:
texinfo-segv.patch (1.1 -> 1.2)
---- Diffs:
================================================================
Index: SOURCES/texinfo-segv.patch
diff -u SOURCES/texinfo-segv.patch:1.1 SOURCES/texinfo-segv.patch:1.2
--- SOURCES/texinfo-segv.patch:1.1 Mon Nov 3 23:04:47 2008
+++ SOURCES/texinfo-segv.patch Mon Nov 3 23:53:50 2008
@@ -6,14 +6,15 @@
{
- char s[1];
+ char s[2];
- sprintf (s, "%c", numbers[0] + 64);
+- sprintf (s, "%c", numbers[0] + 64);
++ snprintf (s, sizeof(s), "%c", numbers[0] + 64);
return xstrdup (s);
}
else
{
char s[5];
- sprintf (s, "%d", numbers[0]);
-+ sprintf (s, "%4d", numbers[0]);
++ snprintf (s, sizeof(s), "%d", numbers[0]);
return xstrdup (s);
}
}
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/texinfo-segv.patch?r1=1.1&r2=1.2&f=u
More information about the pld-cvs-commit
mailing list