ref: ff2dcd6b596643c97fd8d4801bbcde94f01b6347
parent: 9e73bb8f42673674c6ddf1e87e72f2c7edaec52e
author: Derek Buitenhuis <[email protected]>
date: Tue Oct 2 09:33:18 EDT 2018
decode: Fix unchecked malloc in decode_frame Signed-off-by: Derek Buitenhuis <[email protected]>
--- a/src/decode.c
+++ b/src/decode.c
@@ -2285,6 +2285,7 @@
f->frame_thread.tile_start_off =
malloc(sizeof(*f->frame_thread.tile_start_off) *
f->frame_hdr.tiling.cols * f->frame_hdr.tiling.rows);
+ if (!f->frame_thread.tile_start_off) return -ENOMEM;
}
f->n_ts = f->frame_hdr.tiling.cols * f->frame_hdr.tiling.rows;
}