From: James Zern Date: Wed, 18 Mar 2015 21:34:30 +0000 (-0700) Subject: vp9_resize_plane: quiet some static analysis warnings X-Git-Tag: v1.4.0~16^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c4367b9b51782969d3b37ead6694d19ef9bfb58c;p=libvpx vp9_resize_plane: quiet some static analysis warnings document resolution assumptions with a few asserts Change-Id: Ia4ab738fd3e0a1ba0ed30a57facd2658c2c1fd60 --- diff --git a/vp9/encoder/vp9_resize.c b/vp9/encoder/vp9_resize.c index 3d361d4f2..2ebdff291 100644 --- a/vp9/encoder/vp9_resize.c +++ b/vp9/encoder/vp9_resize.c @@ -516,6 +516,10 @@ void vp9_resize_plane(const uint8_t *const input, uint8_t *tmpbuf = (uint8_t *)malloc(sizeof(uint8_t) * (width < height ? height : width)); uint8_t *arrbuf = (uint8_t *)malloc(sizeof(uint8_t) * (height + height2)); + assert(width > 0); + assert(height > 0); + assert(width2 > 0); + assert(height2 > 0); for (i = 0; i < height; ++i) resize_multistep(input + in_stride * i, width, intbuf + width2 * i, width2, tmpbuf);