AMV: Fix possibly exploitable crash.
Reported-at: Thu, 21 Apr 2011 14:38:25 +0000 Reported-by: Dominic Chell <Dominic.Chell@ngssecure.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 89f903b3d5ec38c9c5d90fba7e626fa0eda61a32)
This commit is contained in:
parent
99d3772ef4
commit
9b919571e5
@ -90,7 +90,6 @@ static int sp5x_decode_frame(AVCodecContext *avctx,
|
|||||||
recoded[j++] = 0xFF;
|
recoded[j++] = 0xFF;
|
||||||
recoded[j++] = 0xD9;
|
recoded[j++] = 0xD9;
|
||||||
|
|
||||||
avctx->flags &= ~CODEC_FLAG_EMU_EDGE;
|
|
||||||
av_init_packet(&avpkt_recoded);
|
av_init_packet(&avpkt_recoded);
|
||||||
avpkt_recoded.data = recoded;
|
avpkt_recoded.data = recoded;
|
||||||
avpkt_recoded.size = j;
|
avpkt_recoded.size = j;
|
||||||
@ -216,6 +215,6 @@ AVCodec amv_decoder = {
|
|||||||
NULL,
|
NULL,
|
||||||
ff_mjpeg_decode_end,
|
ff_mjpeg_decode_end,
|
||||||
sp5x_decode_frame,
|
sp5x_decode_frame,
|
||||||
CODEC_CAP_DR1,
|
0,
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("AMV Video"),
|
.long_name = NULL_IF_CONFIG_SMALL("AMV Video"),
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user