mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-04 06:08:26 +02:00
avcodec/vp3: check current_frame before accessing it
Fixes null pointer dereference Fixes: b15eb06e0111e94bc59123c86db7aff9_signal_sigsegv_a0500f_45_320vp3.nsv with allocation limit 536870912 Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
ba05166174
commit
697160366f
@ -1947,6 +1947,8 @@ static int vp3_update_thread_context(AVCodecContext *dst, const AVCodecContext *
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (s != s1) {
|
if (s != s1) {
|
||||||
|
if (!s->current_frame.f)
|
||||||
|
return AVERROR(ENOMEM);
|
||||||
// init tables if the first frame hasn't been decoded
|
// init tables if the first frame hasn't been decoded
|
||||||
if (!s->current_frame.f->data[0]) {
|
if (!s->current_frame.f->data[0]) {
|
||||||
int y_fragment_count, c_fragment_count;
|
int y_fragment_count, c_fragment_count;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user