avcodec/mlp_parser: check ff_combine_frame() return code
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 4 Jul 2014 17:33:54 +0000 (19:33 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 4 Jul 2014 18:29:40 +0000 (20:29 +0200)
Fixes CID602338

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/mlp_parser.c

index dae19e7..4bb82ee 100644 (file)
@@ -230,6 +230,7 @@ static int mlp_parse(AVCodecParserContext *s,
     int sync_present;
     uint8_t parity_bits;
     int next;
+    int ret;
     int i, p = 0;
 
     *poutbuf_size = 0;
@@ -256,7 +257,10 @@ static int mlp_parse(AVCodecParserContext *s,
             return buf_size;
         }
 
-        ff_combine_frame(&mp->pc, i - 7, &buf, &buf_size);
+        if ((ret = ff_combine_frame(&mp->pc, i - 7, &buf, &buf_size)) < 0) {
+            av_log(avctx, AV_LOG_WARNING, "ff_combine_frame failed\n");
+            return ret;
+        }
 
         return i - 7;
     }