Annotation of /trunk/ghostscript-gpl/patches/ghostscript-gpl-9.01-vsnprintf.patch
Parent Directory | Revision Log
Revision 1374 -
(hide annotations)
(download)
Wed Jun 29 12:17:32 2011 UTC (13 years, 3 months ago) by niro
File size: 1162 byte(s)
Wed Jun 29 12:17:32 2011 UTC (13 years, 3 months ago) by niro
File size: 1162 byte(s)
added fedora patches
1 | niro | 1374 | diff -up ghostscript-9.01/base/gsmisc.c.vsnprintf ghostscript-9.01/base/gsmisc.c |
2 | diff -up ghostscript-9.01/base/gxttfb.c.vsnprintf ghostscript-9.01/base/gxttfb.c | ||
3 | --- ghostscript-9.01/base/gxttfb.c.vsnprintf 2011-01-14 18:58:46.000000000 +0000 | ||
4 | +++ ghostscript-9.01/base/gxttfb.c 2011-02-10 09:48:01.334990056 +0000 | ||
5 | @@ -246,7 +246,7 @@ static int DebugPrint(ttfFont *ttf, cons | ||
6 | |||
7 | if (gs_debug_c('Y')) { | ||
8 | va_start(args, fmt); | ||
9 | - count = vsprintf(buf, fmt, args); | ||
10 | + count = vsnprintf(buf, sizeof (buf), fmt, args); | ||
11 | /* NB: moved debug output from stdout to stderr | ||
12 | */ | ||
13 | errwrite(ttf->DebugMem, buf, count); | ||
14 | diff -up ghostscript-9.01/base/rinkj/rinkj-byte-stream.c.vsnprintf ghostscript-9.01/base/rinkj/rinkj-byte-stream.c | ||
15 | --- ghostscript-9.01/base/rinkj/rinkj-byte-stream.c.vsnprintf 2008-04-04 02:02:16.000000000 +0100 | ||
16 | +++ ghostscript-9.01/base/rinkj/rinkj-byte-stream.c 2011-02-10 09:48:01.338989692 +0000 | ||
17 | @@ -43,7 +43,7 @@ rinkj_byte_stream_printf (RinkjByteStrea | ||
18 | va_list ap; | ||
19 | |||
20 | va_start (ap, fmt); | ||
21 | - len = vsprintf (str, fmt, ap); | ||
22 | + len = vsnprintf (str, sizeof (str), fmt, ap); | ||
23 | va_end (ap); | ||
24 | return rinkj_byte_stream_write (bs, str, len); | ||
25 | } |