ref: c82cf102fc635c73d7e6e94d19f37cacd90c44cb
parent: 52b575c82641c0098404a874379c33e215afc563
author: Janne Grunau <[email protected]>
date: Sat Dec 8 10:32:12 EST 2018
fix mvs_ref NULL ptr dererence after allocation error
--- a/src/decode.c
+++ b/src/decode.c
@@ -3178,6 +3178,10 @@
if ((f->frame_hdr->frame_type & 1) || f->frame_hdr->allow_intrabc) {
f->mvs_ref = dav1d_ref_create(f->sb128h * 32 * f->b4_stride *
sizeof(*f->mvs));
+ if (!f->mvs_ref) {
+ res = -ENOMEM;
+ goto error;
+ }
f->mvs = f->mvs_ref->data;
if (!f->frame_hdr->allow_intrabc) {
for (int i = 0; i < 7; i++)