mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-23 23:21:06 +01:00
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>
This commit is contained in:
parent
fa1b2c8e18
commit
c4ce870967
1 changed files with 1 additions and 1 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue