]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/notchlc: Revert incorrect compression bound
authorMichael Niedermayer <michael@niedermayer.cc>
Tue, 20 Oct 2020 15:18:11 +0000 (17:18 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Tue, 20 Oct 2020 15:18:11 +0000 (17:18 +0200)
Revert "avcodec/notchlc: Check uncompressed size against input for LZ4"

Found-by: durandal_1707
This reverts commit 51002362c4ed301e54cea1597666cd5cc9a134f3.

libavcodec/notchlc.c

index d13ce3193c928acb61c719a0c20ee9e40a7ee4bf..3f7079da7057a11f328509ff329b5be28627182c 100644 (file)
@@ -490,11 +490,6 @@ static int decode_frame(AVCodecContext *avctx,
 
         bytestream2_init(gb, s->lzf_buffer, uncompressed_size);
     } else if (s->format == 1) {
-        unsigned remaining = bytestream2_get_bytes_left(gb);
-
-        if (remaining > 0x7E000000U || remaining + remaining/255 + 16 < uncompressed_size)
-            return AVERROR_INVALIDDATA;
-
         av_fast_padded_malloc(&s->uncompressed_buffer, &s->uncompressed_size,
                               uncompressed_size);
         if (!s->uncompressed_buffer)