summaryrefslogtreecommitdiff
path: root/repo/ghostscript/fix-sprintf.patch
blob: 5a06af562031b4c836d0fc6167297fd588a41743 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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;