[FFmpeg-devel] [PATCH v1 1/1] avcodec/vble: Return value check for init_get_bits

Maryam Ebrahimzadeh me22bee at outlook.com
Mon Aug 30 11:19:08 EEST 2021


There are some other checks in init_get_bits function that make the function return AVERROR_INVALIDDATA. So it is essential to check the return value.

Line 629 in libavcodec/get_bits.h function init_get_bits_xe:

if (bit_size >= INT_MAX - FFMAX(7, AV_INPUT_BUFFER_PADDING_SIZE*8) || bit_size < 0 || !buffer) {
        bit_size    = 0;
        buffer      = NULL;
        ret         = AVERROR_INVALIDDATA;
    }


More information about the ffmpeg-devel mailing list