Blame SOURCES/ghostscript-cve-2020-16290.patch

0ab051
diff --git a/devices/gdev3852.c b/devices/gdev3852.c
0ab051
index e21b403..2bee8ec 100644
0ab051
--- a/devices/gdev3852.c
0ab051
+++ b/devices/gdev3852.c
0ab051
@@ -76,6 +76,13 @@ jetp3852_print_page(gx_device_printer *pdev, FILE *prn_stream)
0ab051
            {	int lnum;
0ab051
                 int line_size = gdev_mem_bytes_per_scan_line((gx_device *)pdev);
0ab051
                 int num_blank_lines = 0;
0ab051
+
0ab051
+                if (line_size > DATA_SIZE) {
0ab051
+                  emprintf2(pdev->memory, "invalid resolution and/or width gives line_size = %d, max. is %d\n",
0ab051
+                            line_size, DATA_SIZE);
0ab051
+                  return_error(gs_error_rangecheck);
0ab051
+               }
0ab051
+                
0ab051
                 for ( lnum = 0; lnum < pdev->height; lnum++ )
0ab051
                    {	byte *end_data = data + line_size;
0ab051
                         gdev_prn_copy_scan_lines(pdev, lnum,