Commit b567f04e authored by Janne Grunau's avatar Janne Grunau

decode: error out on missing reference frames

Fixes segfaults with
david-fuzzing-data:artifacts/crash-b9015ad03b63131c25016592c3535da1268a08ad.
parent cccebfce
Pipeline #1022 passed with stage
in 1 minute and 58 seconds
......@@ -2775,6 +2775,11 @@ int dav1d_submit_frame(Dav1dContext *const c) {
}
for (int i = 0; i < 7; i++) {
const int refidx = f->frame_hdr.refidx[i];
if (!c->refs[refidx].p.p.data[0]) {
for (int j = 0; j < i; j++)
dav1d_thread_picture_unref(&f->refp[j]);
return -EINVAL;
}
dav1d_thread_picture_ref(&f->refp[i], &c->refs[refidx].p);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment