blob: 4a8b2547adf2a9e9cf1f387a1d3e86fc03579f97 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
--- a/jdmarker.c
+++ b/jdmarker.c
@@ -342,6 +342,12 @@ get_sos (j_decompress_ptr cinfo)
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. */
|