From: Andrey Volk Date: Wed, 5 Jan 2022 15:35:06 +0000 (+0300) Subject: [libvpx] scan-build: prevent division by zero in vpx_int_pro_row_c() X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b41f55b33ab2e47b454f45b138ead2e471709385;p=thirdparty%2Ffreeswitch.git [libvpx] scan-build: prevent division by zero in vpx_int_pro_row_c() --- diff --git a/libs/libvpx/vpx_dsp/avg.c b/libs/libvpx/vpx_dsp/avg.c index 1c45e8a73d..576d683fef 100644 --- a/libs/libvpx/vpx_dsp/avg.c +++ b/libs/libvpx/vpx_dsp/avg.c @@ -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;