changeset 7011:9e7bfab5bb87

8029760: Enhance AWT image libraries Reviewed-by: prr, vadim, mschoene
author pchelko
date Tue, 17 Dec 2013 13:59:04 +0400
parents f78849b94ee7
children 33d856938d83
files src/share/native/sun/awt/image/jpeg/jdmarker.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/native/sun/awt/image/jpeg/jdmarker.c	Mon Dec 16 18:52:48 2013 -0800
+++ b/src/share/native/sun/awt/image/jpeg/jdmarker.c	Tue Dec 17 13:59:04 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. */