File: bad_size_t_redef.patch

package info (click to toggle)
pike7.8 7.8.866-7
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 69,304 kB
  • ctags: 28,082
  • sloc: ansic: 252,877; xml: 36,537; makefile: 4,214; sh: 2,879; lisp: 655; asm: 591; objc: 212; pascal: 157; sed: 34
file content (26 lines) | stat: -rw-r--r-- 900 bytes parent folder | download | duplicates (2)
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
Bug-Debian: https://bugs.debian.org/750430
Description: Fix undefined behaviour/buffer overruns on 64-bit architectures caused by broken redefinition of size_t.
 Basically the same change as was made to image_jpeg.c in 2008.
Origin: upstream, http://pike-librarian.lysator.liu.se/piff.xml?module=pike.git&file=src/modules/_Image_JPEG/image_jpeg.c&from=adc0e9374373e1ba10c5984038267f600322099c&to=4e36f92cfa282f0b673b0087e50708a5f41c3e24

--- a/src/modules/_Image_JPEG/transupp.c
+++ b/src/modules/_Image_JPEG/transupp.c
@@ -36,17 +36,7 @@
  *         of internals, and added inclusion of jerror.h
  */
 
-#define FILE void
-#define size_t unsigned int
-/* NOTE: INT32 and INT16 are redefined by <jmorecfg.h>. */
-#if 0
-#ifdef INT16
-#undef INT16
-#endif /* INT16 */
-#ifdef INT32
-#undef INT32
-#endif
-#endif /* 0 */
+#include <stdio.h>
 
 #define XMD_H /* Avoid INT16 / INT32 being redefined */