]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/aacdec.c
avcodec/aacdec: Check if we run out of input in read_stream_mux_config()
[ffmpeg] / libavcodec / aacdec.c
index 98b6e58be3b549c567f0c6ef6b526a2f954f328a..d17852d8ba8597cf1ab601ccaeb5b786fcbda0e8 100644 (file)
@@ -409,6 +409,8 @@ static int read_stream_mux_config(struct LATMContext *latmctx,
             } else {
                 int esc;
                 do {
+                    if (get_bits_left(gb) < 9)
+                        return AVERROR_INVALIDDATA;
                     esc = get_bits(gb, 1);
                     skip_bits(gb, 8);
                 } while (esc);