summaryrefslogtreecommitdiff
path: root/libavformat/flvdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-04-16 12:01:55 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-04-16 12:01:55 +0200
commitc4ce8709676a6f0b41761093b0da08de72799ba9 (patch)
tree5ddbd837eba004e80b3a4717a0ab3ea39dad388a /libavformat/flvdec.c
parentfa1b2c8e188d96ea9de0b9dbe7a8833f9b84d501 (diff)
downloadffmpeg-c4ce8709676a6f0b41761093b0da08de72799ba9.tar.gz
flvdec: allocate large enough buffer so get_bits() doesnt overread
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/flvdec.c')
-rw-r--r--libavformat/flvdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index c44464105a..3d23b67c29 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
@@ -112,7 +112,7 @@ static int flv_set_video_codec(AVFormatContext *s, AVStream *vstream, int flv_co
vcodec->codec_id = CODEC_ID_VP6A;
if(vcodec->extradata_size != 1) {
vcodec->extradata_size = 1;
- vcodec->extradata = av_malloc(1);
+ vcodec->extradata = av_malloc(1 + FF_INPUT_BUFFER_PADDING_SIZE);
}
vcodec->extradata[0] = avio_r8(s->pb);
return 1; // 1 byte body size adjustment for flv_read_packet()