From a3f09c03b89ddd25e1aa7da4b2bd30a805f9d740 Mon Sep 17 00:00:00 2001 From: Johann Date: Wed, 14 Mar 2018 14:45:23 -0700 Subject: [PATCH] vp9_resize.c: assert vp9_highbd_resize_plane conditions Clears static analysis warnings similar to the low bitdepth version: commit c4367b9b51782969d3b37ead6694d19ef9bfb58c Author: James Zern Date: Wed Mar 18 14:34:30 2015 -0700 vp9_resize_plane: quiet some static analysis warnings Change-Id: I5501d0d6ad7c7720d746d53ec07078cb9051d0d7 --- vp9/encoder/vp9_resize.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vp9/encoder/vp9_resize.c b/vp9/encoder/vp9_resize.c index f6c4aad4d..6ac77aeef 100644 --- a/vp9/encoder/vp9_resize.c +++ b/vp9/encoder/vp9_resize.c @@ -720,6 +720,10 @@ void vp9_highbd_resize_plane(const uint8_t *const input, int height, int width, 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);