summaryrefslogtreecommitdiff
path: root/repo/ghostscript/fix-sprintf.patch
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-06-04 15:08:04 +0100
committerdavidovski <david@davidovski.xyz>2022-06-04 15:08:04 +0100
commit873665024ebfaa761ee49b508a79db7178aeb778 (patch)
tree6cd3b4ce3a9f4b0586ffa48e73a6ba4c8da2db43 /repo/ghostscript/fix-sprintf.patch
parent4445f6e15185f58dc599390ab74df3ca19b437b7 (diff)
added gnupg
Diffstat (limited to 'repo/ghostscript/fix-sprintf.patch')
-rw-r--r--repo/ghostscript/fix-sprintf.patch17
1 files changed, 17 insertions, 0 deletions
diff --git a/repo/ghostscript/fix-sprintf.patch b/repo/ghostscript/fix-sprintf.patch
new file mode 100644
index 0000000..5a06af5
--- /dev/null
+++ b/repo/ghostscript/fix-sprintf.patch
@@ -0,0 +1,17 @@
+diff --git a/cups/gdevcups.c b/cups/gdevcups.c
+index c00e758..35b4035 100644
+--- a/cups/gdevcups.c
++++ b/cups/gdevcups.c
+@@ -4353,10 +4353,10 @@ cups_set_color_info(gx_device *pdev) /* I - Device info */
+ */
+
+ 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;