]> git.sesse.net Git - ffmpeg/commit
mpeg4dec: Ensure data is not clobbered too early.
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>
Wed, 18 Sep 2013 23:08:30 +0000 (01:08 +0200)
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>
Sat, 21 Sep 2013 07:40:28 +0000 (09:40 +0200)
commitf76b633a94e19dc8aca0b80143272ce9b497f94c
treebee7089ab1d21a0d69fdce68a691c10afb68f7c9
parent6c169c2fa4f3665c4535089e64f23af3e8200a11
mpeg4dec: Ensure data is not clobbered too early.

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: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
libavcodec/h263dec.c