From 3c1824a68512c76b26b9097faa5f9f2d9dc26d36 Mon Sep 17 00:00:00 2001 From: Dragos Oancea Date: Thu, 23 Mar 2023 15:09:53 +0200 Subject: [PATCH] [mod_amr] coverity CID 1395603 (Unsigned compared against 0) --- src/mod/codecs/mod_amr/bitshift.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mod/codecs/mod_amr/bitshift.c b/src/mod/codecs/mod_amr/bitshift.c index fd3fc55606..05a00ff1b5 100644 --- a/src/mod/codecs/mod_amr/bitshift.c +++ b/src/mod/codecs/mod_amr/bitshift.c @@ -47,7 +47,7 @@ extern int switch_amr_array_lshift(uint8_t lshift, uint8_t *buf, int a_len) if (!buf || !a_len) return (-1); - if ((lshift < 0) || (lshift > 8)) + if (lshift > 8) return (-1); first_byte = 0xFF >> lshift;