OSDN Git Service

mjpegdec: Do not assume unused plane pointer are NULL.
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>
Thu, 25 Feb 2016 23:11:12 +0000 (00:11 +0100)
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>
Sun, 28 Feb 2016 12:32:01 +0000 (13:32 +0100)
commit45fa03b1f9b0475df666f7592f250c37763b7d64
tree159bbe6c6a7d191310832cfdcfd505afa37db64b
parent0f199f0ad01ea4504edcfd947c85cfa69292f881
mjpegdec: Do not assume unused plane pointer are NULL.

We do neither document nor check such a requirement
and for application-provided get_buffer2 they could
contain the result of a malloc(0) or whatever value
they had previously.
This fixes a use-after-free in e.g. MPlayer:
https://trac.mplayerhq.hu/ticket/2262
We might want to consider changing the (documented)
API in addition though.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
libavcodec/mjpegdec.c