• Michael Niedermayer's avatar
    avcodec: fix aac/ac3 parser bitstream buffer size · fccd85b9
    Michael Niedermayer authored
    Buffers containing copies of the AAC and AC3 header bits were not padded
    before parsing, violating init_get_bits() buffer padding requirement,
    leading to potential buffer read overflows.
    This change adds FF_INPUT_BUFFER_PADDING_SIZE bytes to the bit buffer
    for parsing the header in each of aac_parser.c and ac3_parser.c.
    
    Based on patch by: Matt Wolenetz <wolenetz@chromium.org>
    Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
    fccd85b9
aac_parser.c 2.14 KB