/[packages]/cauldron/ghostscript/current/SOURCES/ghostscript-wrf-snprintf.patch
ViewVC logotype

Contents of /cauldron/ghostscript/current/SOURCES/ghostscript-wrf-snprintf.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 595416 - (show annotations) (download)
Sat Feb 22 00:48:32 2014 UTC (6 years, 5 months ago) by tv
File size: 767 byte(s)
SILENT: new file ./SOURCES/ghostscript-wrf-snprintf.patch
1 diff -up ghostscript-9.07/base/wrfont.c.wrf-snprintf ghostscript-9.07/base/wrfont.c
2 --- ghostscript-9.07/base/wrfont.c.wrf-snprintf 2013-07-01 13:02:33.373244683 +0100
3 +++ ghostscript-9.07/base/wrfont.c 2013-07-01 13:04:55.022864299 +0100
4 @@ -72,7 +72,8 @@ WRF_wfloat(WRF_output * a_output, double
5 {
6 char buffer[32];
7
8 - gs_sprintf(buffer, "%f", a_float);
9 + if (gs_snprintf(buffer, sizeof (buffer), "%f", a_float) >= sizeof (buffer))
10 + abort();
11 WRF_wstring(a_output, buffer);
12 }
13
14 @@ -81,6 +82,7 @@ WRF_wint(WRF_output * a_output, long a_i
15 {
16 char buffer[32];
17
18 - gs_sprintf(buffer, "%ld", a_int);
19 + if (gs_snprintf(buffer, sizeof (buffer), "%ld", a_int) >= sizeof (buffer))
20 + abort();
21 WRF_wstring(a_output, buffer);
22 }

  ViewVC Help
Powered by ViewVC 1.1.28