From 574b4b069c528d7be6fa9b409310088b9d9a3985 Mon Sep 17 00:00:00 2001 From: Dutchman101 Date: Fri, 21 Jun 2024 22:21:05 +0200 Subject: [PATCH] Fix issue #25 (Undefined behavior / Arithmetic overflow in bits.c) --- libspeex/bits.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libspeex/bits.c b/libspeex/bits.c index 2d782a2d..4f457af1 100644 --- a/libspeex/bits.c +++ b/libspeex/bits.c @@ -275,7 +275,7 @@ EXPORT int speex_bits_unpack_signed(SpeexBits *bits, int nbBits) /* If number is negative */ if (d>>(nbBits-1)) { - d |= (-1)<