]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[libvpx] scan-build: prevent division by zero in vpx_int_pro_row_c()
authorAndrey Volk <andywolk@gmail.com>
Wed, 5 Jan 2022 15:35:06 +0000 (18:35 +0300)
committerAndrey Volk <andywolk@gmail.com>
Tue, 9 Aug 2022 20:24:47 +0000 (23:24 +0300)
libs/libvpx/vpx_dsp/avg.c

index 1c45e8a73ddcbec1c851c9adbaba2ef99fb1af03..576d683fef51a91987b5e72a6369744e542114ab 100644 (file)
@@ -344,6 +344,7 @@ void vpx_int_pro_row_c(int16_t hbuf[16], const uint8_t *ref,
                        const int ref_stride, const int height) {
   int idx;
   const int norm_factor = height >> 1;
+  if (height == 1) return;
   for (idx = 0; idx < 16; ++idx) {
     int i;
     hbuf[idx] = 0;