diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2015-04-01 12:48:59 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2015-04-01 12:48:59 +0000 |
commit | 7afc497e0be5bad2931d88174031d3a56a58cc25 (patch) | |
tree | f2e4dfd8d462fc2b26426a9f879ce89d18c6af27 /main/ghostscript/ghostscript-wrf-snprintf.patch | |
parent | 9829a12686899b9540c08b1db1d531df70ba247c (diff) | |
download | aports-7afc497e0be5bad2931d88174031d3a56a58cc25.tar.bz2 aports-7afc497e0be5bad2931d88174031d3a56a58cc25.tar.xz |
main/ghostscript: upgrade to 9.16
Diffstat (limited to 'main/ghostscript/ghostscript-wrf-snprintf.patch')
-rw-r--r-- | main/ghostscript/ghostscript-wrf-snprintf.patch | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/main/ghostscript/ghostscript-wrf-snprintf.patch b/main/ghostscript/ghostscript-wrf-snprintf.patch new file mode 100644 index 0000000000..74d8c2a5c6 --- /dev/null +++ b/main/ghostscript/ghostscript-wrf-snprintf.patch @@ -0,0 +1,22 @@ +diff -up ghostscript-9.07/base/wrfont.c.wrf-snprintf ghostscript-9.07/base/wrfont.c +--- ghostscript-9.07/base/wrfont.c.wrf-snprintf 2013-07-01 13:02:33.373244683 +0100 ++++ ghostscript-9.07/base/wrfont.c 2013-07-01 13:04:55.022864299 +0100 +@@ -72,7 +72,8 @@ WRF_wfloat(WRF_output * a_output, double + { + char buffer[32]; + +- gs_sprintf(buffer, "%f", a_float); ++ if (gs_snprintf(buffer, sizeof (buffer), "%f", a_float) >= sizeof (buffer)) ++ abort(); + WRF_wstring(a_output, buffer); + } + +@@ -81,6 +82,7 @@ WRF_wint(WRF_output * a_output, long a_i + { + char buffer[32]; + +- gs_sprintf(buffer, "%ld", a_int); ++ if (gs_snprintf(buffer, sizeof (buffer), "%ld", a_int) >= sizeof (buffer)) ++ abort(); + WRF_wstring(a_output, buffer); + } |