shithub: dav1d

Download patch

ref: 1b5d335959c75f477ca4566cf72158f426ea74f8
parent: a32c50862831c9f74ad38acf5764dac30a15a718
author: Janne Grunau <[email protected]>
date: Wed Oct 3 08:25:02 EDT 2018

parsing: error out when trying to decode a frame without tile data

Replaces an assert with a check and return error. Fixes an assert fail
with crash-ea35702b18cd8c17da7505126eb0e6aa6914f09d.

--- a/src/obu.c
+++ b/src/obu.c
@@ -1065,7 +1065,8 @@
     if (c->have_seq_hdr && c->have_frame_hdr &&
         c->tile_mask == (1 << n_tiles) - 1)
     {
-        assert(c->n_tile_data);
+        if (!c->n_tile_data)
+            return -EINVAL;
         dav1d_submit_frame(c);
         assert(!c->n_tile_data);
         c->have_frame_hdr = 0;