From a62e624d7cd09e049d0442b003be9f400f49842a Mon Sep 17 00:00:00 2001 From: Dominik Loidolt <dominik.loidolt@univie.ac.at> Date: Wed, 30 Aug 2023 12:47:14 +0200 Subject: [PATCH] Add comment --- lib/decmp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/decmp.c b/lib/decmp.c index dc39486..5db2bce 100644 --- a/lib/decmp.c +++ b/lib/decmp.c @@ -119,6 +119,7 @@ static unsigned int rice_decoder(uint32_t code_word, uint32_t m, uint32_t log2_m cw_len = q + 1 + rl; /* Number of 1's + following 0 + remainder length */ /* get remainder code */ + /* mask shift to prevented undefined behaviour in error case cw_len > 32 */ code_word >>= (32 - cw_len) & 0x1FU; r = code_word & ((1U << rl) - 1); -- GitLab