view patches/openjdk/6989760-native_warnings.patch @ 3024:3b654e7cbe51

Backport a number of JPEG fixes from 7u. S4893408: JPEGReader throws IllegalArgException when setting the destination to BYTE_GRAY S6631559: Registration of ImageIO plugins should not cause loading of jpeg.dlli and cmm.dll S6791502: IIOException "Invalid icc profile" on jpeg after update from JDK5 to JDK6 S6793818: JpegImageReader is too greedy creating color profiles S6888215: memory leak in jpeg plugin S6989760: cmm native compiler warnings S6989774: imageio compiler warnings in native code S7013519: [parfait] Integer overflows in 2D code S7018912: [parfait] potential buffer overruns in imageio jpeg S8005194: [parfait] #353 sun/awt/image/jpeg/imageioJPEG.c Memory leak of pointer 'scale' allocated with calloc() S8020983, RH976897: OutOfMemoryError caused by non garbage collected JPEGImageWriter Instances 2013-08-30 Andrew John Hughes <gnu.andrew@redhat.com> * Makefile.am: (ICEDTEA_PATCHES): Add new patches. * NEWS: Updated with new patches. * patches/imageiojpeg_sync.patch: Bring in changes to imageioJPEG.c made between the start of OpenJDK 6 and the start of OpenJDK 7's hg repositories. * patches/libraries.patch: Updated against patches below. * patches/openjdk/4893408-jpegreader_byte_gray.patch, * patches/openjdk/6631559-dont_load_libjpeg_to_register_imageio_plugins.patch, * patches/openjdk/6791502-invalid_icc_profile.patch, * patches/openjdk/6793818-jpegimagereader_too_greedy.patch, * patches/openjdk/6888215-jpeg_memory_leak.patch, * patches/openjdk/6989760-native_warnings.patch, * patches/openjdk/6989774-imageio_compiler_warnings.patch, * patches/openjdk/7013519-integer_overflows.patch, * patches/openjdk/7018912-potential_buffer_overruns_in_jpeg.patch, * patches/openjdk/8005194-scale_memory_leak.patch, * patches/openjdk/8020983-outofmemoryerror_jpegimagewriter.patch: New backports from OpenJDK 7u.
author Andrew John Hughes <gnu.andrew@redhat.com>
date Tue, 19 Nov 2013 18:39:31 +0000
parents
children
line wrap: on
line source

# HG changeset patch
# User bae
# Date 1300292466 -10800
#      Wed Mar 16 19:21:06 2011 +0300
# Node ID 5c61c31d2621e53e4fe011d235b7f05d0a40ba63
# Parent  253f3bc64961944b1886a243a662bd929e9ab605
6989760: cmm native compiler warnings
Reviewed-by: prr, ohair

diff --git a/make/sun/cmm/kcms/Makefile b/make/sun/cmm/kcms/Makefile
--- openjdk/jdk/make/sun/cmm/kcms/Makefile
+++ openjdk/jdk/make/sun/cmm/kcms/Makefile
@@ -72,7 +72,8 @@
 # Extra rules
 #
 ifeq  ($(PLATFORM), linux)
-LDLIBS += -lpthread
+    LDLIBS += -lpthread
+    OTHER_CFLAGS += -Wno-missing-field-initializers
 endif
 
 clean clobber:: 
@@ -104,6 +105,5 @@
 
 endif # PLATFORM
 
-#CFLAGS += -DJAVACMM -DFUT_CALC_EX -DNO_FUT_GCONST
-CFLAGS += -DFUT_CALC_EX -DNO_FUT_GCONST
+CFLAGS += -DJAVACMM -DFUT_CALC_EX -DNO_FUT_GCONST
 
diff --git a/src/share/native/sun/awt/image/jpeg/imageioJPEG.c b/src/share/native/sun/awt/image/jpeg/imageioJPEG.c
--- openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c
+++ openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c
@@ -2657,7 +2657,7 @@
         (destWidth < 0) || (destWidth > srcWidth) ||
         (destHeight < 0) ||
         (stepX < 0) || (stepY < 0) ||
-        ((scanLineSize / numBands) < destWidth))  /* destWidth causes an integer overflow */
+        ((INT_MAX / numBands) < destWidth))  /* destWidth causes an integer overflow */
     {
         JNU_ThrowByName(env, "javax/imageio/IIOException",
                         "Invalid argument to native writeImage");