mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
h264: dont try to allocate scratchpad if linesize is not known
Fixes out of array access Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
c73685398d
commit
c3bb3334f6
@ -1228,7 +1228,7 @@ static int decode_update_thread_context(AVCodecContext *dst,
|
||||
|
||||
/* frame_start may not be called for the next thread (if it's decoding
|
||||
* a bottom field) so this has to be allocated here */
|
||||
if (!h->bipred_scratchpad)
|
||||
if (!h->bipred_scratchpad && s->linesize)
|
||||
h->bipred_scratchpad = av_malloc(16 * 6 * s->linesize);
|
||||
|
||||
// extradata/NAL handling
|
||||
|
Loading…
Reference in New Issue
Block a user