From b9b0b0091200ecd6dc540cc1f3a646c39769d8ed Mon Sep 17 00:00:00 2001 From: Andrey Volk Date: Wed, 5 Jan 2022 18:35:06 +0300 Subject: [PATCH] [libvpx] scan-build: prevent division by zero in vpx_int_pro_row_c() --- libs/libvpx/vpx_dsp/avg.c | 1 + 1 file changed, 1 insertion(+) 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;