]> git.sesse.net Git - ffmpeg/commitdiff
aac: Make sure to set err on the failure path
authorLuca Barbato <lu_zero@gentoo.org>
Sun, 23 Aug 2015 09:58:47 +0000 (11:58 +0200)
committerLuca Barbato <lu_zero@gentoo.org>
Sun, 23 Aug 2015 19:44:38 +0000 (21:44 +0200)
Bug-Id: CID 1308153

libavcodec/aacdec.c

index d7e0aa57f0cc742fc8d775517d8e665926809a0f..f0c7960d28da59c1681225758eb0b50f9660da27 100644 (file)
@@ -2834,8 +2834,10 @@ static int aac_decode_frame_int(AVCodecContext *avctx, void *data,
     while ((elem_type = get_bits(gb, 3)) != TYPE_END) {
         elem_id = get_bits(gb, 4);
 
-        if (!avctx->channels && elem_type != TYPE_PCE)
+        if (!avctx->channels && elem_type != TYPE_PCE) {
+            err = AVERROR_INVALIDDATA;
             goto fail;
+        }
 
         if (elem_type < TYPE_DSE) {
             if (!(che=get_che(ac, elem_type, elem_id))) {