[FFmpeg-cvslog] aac: Make sure to set err on the failure path

Luca Barbato git at videolan.org
Mon Aug 24 10:44:31 CEST 2015


ffmpeg | branch: master | Luca Barbato <lu_zero at gentoo.org> | Sun Aug 23 11:58:47 2015 +0200| [d5eab59a5373b22aa52d6053a8e853e95a6e131e] | committer: Luca Barbato

aac: Make sure to set err on the failure path

Bug-Id: CID 1308153

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d5eab59a5373b22aa52d6053a8e853e95a6e131e
---

 libavcodec/aacdec.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c
index d7e0aa5..f0c7960 100644
--- a/libavcodec/aacdec.c
+++ b/libavcodec/aacdec.c
@@ -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))) {



More information about the ffmpeg-cvslog mailing list