8029760: Enhance AWT image libraries
authorpchelko
Wed, 18 Dec 2013 10:43:11 +0400
changeset 23896 0b88142bbc7e
parent 23895 ede5bb2c36bf
child 23897 911b1eb93667
8029760: Enhance AWT image libraries Reviewed-by: prr, vadim, mschoene
jdk/src/share/native/sun/awt/image/jpeg/jdmarker.c
--- a/jdk/src/share/native/sun/awt/image/jpeg/jdmarker.c	Thu Dec 19 14:57:13 2013 +0400
+++ b/jdk/src/share/native/sun/awt/image/jpeg/jdmarker.c	Wed Dec 18 10:43:11 2013 +0400
@@ -349,6 +349,12 @@
 
     TRACEMS3(cinfo, 1, JTRC_SOS_COMPONENT, cc,
              compptr->dc_tbl_no, compptr->ac_tbl_no);
+
+    /* This CSi (cc) should differ from the previous CSi */
+    for (ci = 0; ci < i; ci++) {
+      if (cinfo->cur_comp_info[ci] == compptr)
+        ERREXIT1(cinfo, JERR_BAD_COMPONENT_ID, cc);
+    }
   }
 
   /* Collect the additional scan parameters Ss, Se, Ah/Al. */