ref: a3f09c03b89ddd25e1aa7da4b2bd30a805f9d740
parent: 13d0955b250bcb7eac99034e7b1677d3d026b569
author: Johann <johannkoenig@google.com>
date: Wed Mar 14 10:45:23 EDT 2018
vp9_resize.c: assert vp9_highbd_resize_plane conditions Clears static analysis warnings similar to the low bitdepth version: commit c4367b9b51782969d3b37ead6694d19ef9bfb58c Author: James Zern <jzern@google.com> Date: Wed Mar 18 14:34:30 2015 -0700 vp9_resize_plane: quiet some static analysis warnings Change-Id: I5501d0d6ad7c7720d746d53ec07078cb9051d0d7
--- a/vp9/encoder/vp9_resize.c
+++ b/vp9/encoder/vp9_resize.c
@@ -720,6 +720,10 @@
uint16_t *arrbuf2 = (uint16_t *)malloc(sizeof(uint16_t) * height2);
if (intbuf == NULL || tmpbuf == NULL || arrbuf == NULL || arrbuf2 == NULL)
goto Error;
+ assert(width > 0);
+ assert(height > 0);
+ assert(width2 > 0);
+ assert(height2 > 0);
for (i = 0; i < height; ++i) {
highbd_resize_multistep(CONVERT_TO_SHORTPTR(input + in_stride * i), width,
intbuf + width2 * i, width2, tmpbuf, bd);