ghostscript/ghostscript-vsnprintf.patch

26 lines
1.1 KiB
Diff
Raw Normal View History

2011-02-10 10:32:12 +00:00
diff -up ghostscript-9.01/base/gsmisc.c.vsnprintf ghostscript-9.01/base/gsmisc.c
diff -up ghostscript-9.01/base/gxttfb.c.vsnprintf ghostscript-9.01/base/gxttfb.c
--- ghostscript-9.01/base/gxttfb.c.vsnprintf 2011-01-14 18:58:46.000000000 +0000
+++ ghostscript-9.01/base/gxttfb.c 2011-02-10 09:48:01.334990056 +0000
@@ -246,7 +246,7 @@ static int DebugPrint(ttfFont *ttf, cons
if (gs_debug_c('Y')) {
va_start(args, fmt);
- count = vsprintf(buf, fmt, args);
+ count = vsnprintf(buf, sizeof (buf), fmt, args);
/* NB: moved debug output from stdout to stderr
*/
2010-09-23 10:57:49 +00:00
errwrite(ttf->DebugMem, buf, count);
2011-02-10 10:32:12 +00:00
diff -up ghostscript-9.01/base/rinkj/rinkj-byte-stream.c.vsnprintf ghostscript-9.01/base/rinkj/rinkj-byte-stream.c
--- ghostscript-9.01/base/rinkj/rinkj-byte-stream.c.vsnprintf 2008-04-04 02:02:16.000000000 +0100
+++ ghostscript-9.01/base/rinkj/rinkj-byte-stream.c 2011-02-10 09:48:01.338989692 +0000
@@ -43,7 +43,7 @@ rinkj_byte_stream_printf (RinkjByteStrea
va_list ap;
va_start (ap, fmt);
- len = vsprintf (str, fmt, ap);
+ len = vsnprintf (str, sizeof (str), fmt, ap);
va_end (ap);
return rinkj_byte_stream_write (bs, str, len);
}