File: 2012_check_64bit_multiply.patch

package info (click to toggle)
ghostscript 10.06.0~dfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 96,296 kB
  • sloc: ansic: 944,438; python: 7,917; cpp: 6,534; cs: 6,457; sh: 6,168; java: 4,028; perl: 2,373; tcl: 1,639; makefile: 538; awk: 66; yacc: 18
file content (26 lines) | stat: -rw-r--r-- 915 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
--- ghostscript.orig/base/gdevmpla.c
+++ ghostscript/base/gdevmpla.c
@@ -1954,12 +1954,12 @@
         int i;
         int j;
         intptr_t chunky_sraster;
-        intptr_t nbytes;
+        int64_t nbytes;
         byte **line_ptrs;
         byte *sbuf, *buf;
 
         chunky_sraster = sraster * (intptr_t)mdev->num_planar_planes;
-        if (check_64bit_multiply(height, chunky_sraster, (size_t *)&nbytes) != 0)
+        if (check_64bit_multiply(height, chunky_sraster, &nbytes) != 0)
             return gs_note_error(gs_error_undefinedresult);
         buf = gs_alloc_bytes(mdev->memory, nbytes, "mem_planar_strip_copy_rop(buf)");
         if (buf == NULL) {
@@ -2003,7 +2003,7 @@
         intptr_t i;
         intptr_t chunky_t_raster;
         int chunky_t_height;
-        intptr_t nbytes;
+        int64_t nbytes;
         byte **line_ptrs;
         byte *tbuf, *buf;
         gx_strip_bitmap newtex;