Blame SOURCES/ghostscript-wrf-snprintf.patch
|
|
ea5d11 |
diff -up ghostscript-9.07/base/wrfont.c.wrf-snprintf ghostscript-9.07/base/wrfont.c
|
|
|
ea5d11 |
--- ghostscript-9.07/base/wrfont.c.wrf-snprintf 2013-07-01 13:02:33.373244683 +0100
|
|
|
ea5d11 |
+++ ghostscript-9.07/base/wrfont.c 2013-07-01 13:04:55.022864299 +0100
|
|
|
ea5d11 |
@@ -72,7 +72,8 @@ WRF_wfloat(WRF_output * a_output, double
|
|
|
ea5d11 |
{
|
|
|
ea5d11 |
char buffer[32];
|
|
|
ea5d11 |
|
|
|
ea5d11 |
- gs_sprintf(buffer, "%f", a_float);
|
|
|
ea5d11 |
+ if (gs_snprintf(buffer, sizeof (buffer), "%f", a_float) >= sizeof (buffer))
|
|
|
ea5d11 |
+ abort();
|
|
|
ea5d11 |
WRF_wstring(a_output, buffer);
|
|
|
ea5d11 |
}
|
|
|
ea5d11 |
|
|
|
ea5d11 |
@@ -81,6 +82,7 @@ WRF_wint(WRF_output * a_output, long a_i
|
|
|
ea5d11 |
{
|
|
|
ea5d11 |
char buffer[32];
|
|
|
ea5d11 |
|
|
|
ea5d11 |
- gs_sprintf(buffer, "%ld", a_int);
|
|
|
ea5d11 |
+ if (gs_snprintf(buffer, sizeof (buffer), "%ld", a_int) >= sizeof (buffer))
|
|
|
ea5d11 |
+ abort();
|
|
|
ea5d11 |
WRF_wstring(a_output, buffer);
|
|
|
ea5d11 |
}
|