]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/aacdec_template.c
checkasm/vf_blend: Decrease iteration count
[ffmpeg] / libavcodec / aacdec_template.c
index d819958d95c9284dcf0f5080326d070a39976f89..6bc94c879a9a55bff9060814218aa921bdb39e0e 100644 (file)
@@ -451,6 +451,10 @@ static int output_configure(AACContext *ac,
         int type =         layout_map[i][0];
         int id =           layout_map[i][1];
         id_map[type][id] = type_counts[type]++;
+        if (id_map[type][id] >= MAX_ELEM_ID) {
+            avpriv_request_sample(ac->avctx, "Remapped id too large\n");
+            return AVERROR_PATCHWELCOME;
+        }
     }
     // Try to sniff a reasonable channel order, otherwise output the
     // channels in the order the PCE declared them.