• Reimar Döffinger's avatar
    mpeg4dec: Ensure data is not clobbered too early. · f76b633a
    Reimar Döffinger authored
    Avoid overwriting the bitstream buffer data before we
    have ended processing the frame.
    This is necessary to fix hwaccels which might try to use
    the buffer during the end_frame call.
    I am not sure but it is possible this could even trigger
    a use-after-free if the av_fast_malloc allocated a new buffer.
    This would require that decode_slice did not wind the bitstream
    forward all the way to the end, which does not currently happen in
    normal streams.
    Signed-off-by: 's avatarReimar Döffinger <Reimar.Doeffinger@gmx.de>
    f76b633a
h263dec.c 28.1 KB