Commit 6153633d authored by Derek Buitenhuis's avatar Derek Buitenhuis
Browse files

decode: Fix unchecked dav1d_alloc_aligned in decode_frame


Signed-off-by: Derek Buitenhuis's avatarDerek Buitenhuis <derek.buitenhuis@gmail.com>
parent ff2dcd6b
Pipeline #827 passed with stage
in 3 minutes and 30 seconds
...@@ -2324,6 +2324,12 @@ int decode_frame(Dav1dFrameContext *const f) { ...@@ -2324,6 +2324,12 @@ int decode_frame(Dav1dFrameContext *const f) {
uint16_t *lr_ptr = f->lf.lr_lpf_line = uint16_t *lr_ptr = f->lf.lr_lpf_line =
dav1d_alloc_aligned(f->b4_stride * 4 * 3 * 12 * sizeof(uint16_t), 32); dav1d_alloc_aligned(f->b4_stride * 4 * 3 * 12 * sizeof(uint16_t), 32);
if (!ptr || !lr_ptr) {
if (ptr) dav1d_free_aligned(ptr);
if (lr_ptr) dav1d_free_aligned(lr_ptr);
return -ENOMEM;
}
for (int pl = 0; pl <= 2; pl++) { for (int pl = 0; pl <= 2; pl++) {
f->lf.cdef_line_ptr[0][pl][0] = ptr + f->b4_stride * 4 * 0; f->lf.cdef_line_ptr[0][pl][0] = ptr + f->b4_stride * 4 * 0;
f->lf.cdef_line_ptr[0][pl][1] = ptr + f->b4_stride * 4 * 1; f->lf.cdef_line_ptr[0][pl][1] = ptr + f->b4_stride * 4 * 1;
......
Supports Markdown
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