2010-09-23 10:57:49 +00:00
|
|
|
diff -up ghostscript-9.00/base/gsmisc.c.vsnprintf ghostscript-9.00/base/gsmisc.c
|
|
|
|
--- ghostscript-9.00/base/gsmisc.c.vsnprintf 2010-05-06 17:04:27.000000000 +0100
|
|
|
|
+++ ghostscript-9.00/base/gsmisc.c 2010-09-23 10:01:48.152921502 +0100
|
|
|
|
@@ -260,7 +260,7 @@ int gs_throw_imp(const char *func, const
|
2009-12-24 11:31:50 +00:00
|
|
|
va_list ap;
|
|
|
|
|
|
|
|
va_start(ap, fmt);
|
|
|
|
- vsprintf(msg, fmt, ap);
|
|
|
|
+ vsnprintf(msg, sizeof (msg), fmt, ap);
|
|
|
|
msg[sizeof(msg) - 1] = 0;
|
|
|
|
va_end(ap);
|
|
|
|
|
2010-09-23 10:57:49 +00:00
|
|
|
diff -up ghostscript-9.00/base/gxttfb.c.vsnprintf ghostscript-9.00/base/gxttfb.c
|
|
|
|
--- ghostscript-9.00/base/gxttfb.c.vsnprintf 2010-05-05 19:14:21.000000000 +0100
|
|
|
|
+++ ghostscript-9.00/base/gxttfb.c 2010-09-23 10:51:31.575797285 +0100
|
2009-12-24 11:31:50 +00:00
|
|
|
@@ -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);
|
|
|
|
diff -up ghostscript-9.00/base/rinkj/rinkj-byte-stream.c.vsnprintf ghostscript-9.00/base/rinkj/rinkj-byte-stream.c
|
|
|
|
--- ghostscript-9.00/base/rinkj/rinkj-byte-stream.c.vsnprintf 2008-04-04 02:02:16.000000000 +0100
|
|
|
|
+++ ghostscript-9.00/base/rinkj/rinkj-byte-stream.c 2010-09-23 10:01:48.154921184 +0100
|
2009-12-24 11:31:50 +00:00
|
|
|
@@ -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);
|
|
|
|
}
|