--- 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. */