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/fix-sprintf.patch | |
parent | 9829a12686899b9540c08b1db1d531df70ba247c (diff) | |
download | aports-7afc497e0be5bad2931d88174031d3a56a58cc25.tar.bz2 aports-7afc497e0be5bad2931d88174031d3a56a58cc25.tar.xz |
main/ghostscript: upgrade to 9.16
Diffstat (limited to 'main/ghostscript/fix-sprintf.patch')
-rw-r--r-- | main/ghostscript/fix-sprintf.patch | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/main/ghostscript/fix-sprintf.patch b/main/ghostscript/fix-sprintf.patch new file mode 100644 index 000000000..a37303ef6 --- /dev/null +++ b/main/ghostscript/fix-sprintf.patch @@ -0,0 +1,65 @@ +--- ./cups/gdevcups.c.orig ++++ ./cups/gdevcups.c +@@ -1042,7 +1042,7 @@ + + for (i = 0; i < 16; i ++) + { +- sprintf(name, "cupsInteger%d", i); ++ snprintf(name, sizeof(name), "cupsInteger%d", i); + if ((code = param_write_int(plist, strdup(name), + (int *)(cups->header.cupsInteger + i))) < 0) + return (code); +@@ -1050,7 +1050,7 @@ + + for (i = 0; i < 16; i ++) + { +- sprintf(name, "cupsReal%d", i); ++ snprintf(name, sizeof(name), "cupsReal%d", i); + if ((code = param_write_float(plist, strdup(name), + cups->header.cupsReal + i)) < 0) + return (code); +@@ -1058,7 +1058,7 @@ + + for (i = 0; i < 16; i ++) + { +- sprintf(name, "cupsString%d", i); ++ snprintf(name, sizeof(name), "cupsString%d", i); + param_string_from_transient_string(s, cups->header.cupsString[i]); + if ((code = param_write_string(plist, strdup(name), &s)) < 0) + return (code); +@@ -3184,19 +3184,19 @@ + + for (i = 0; i < 16; i ++) + { +- sprintf(name, "cupsInteger%d", i); ++ snprintf(name, sizeof(name), "cupsInteger%d", i); + intoption(cupsInteger[i],strdup(name), unsigned) + } + + for (i = 0; i < 16; i ++) + { +- sprintf(name, "cupsReal%d", i); ++ snprintf(name, sizeof(name), "cupsReal%d", i); + floatoption(cupsReal[i], strdup(name)) + } + + for (i = 0; i < 16; i ++) + { +- sprintf(name, "cupsString%d", i); ++ snprintf(name, sizeof(name), "cupsString%d", i); + stringoption(cupsString[i], strdup(name)) + } + +@@ -4271,10 +4271,10 @@ + */ + + if (pdev->HWResolution[0] != pdev->HWResolution[1]) +- sprintf(resolution, "%.0fx%.0fdpi", pdev->HWResolution[0], ++ snprintf(resolution, sizeof(resolution), "%.0fx%.0fdpi", pdev->HWResolution[0], + pdev->HWResolution[1]); + else +- sprintf(resolution, "%.0fdpi", pdev->HWResolution[0]); ++ snprintf(resolution, sizeof(resolution), "%.0fdpi", pdev->HWResolution[0]); + + for (i = 0, profile = cups->PPD->profiles; + i < cups->PPD->num_profiles; |