Merge pull request #28 from dane1122/fix-ubsan

fix: Cast uint8_t value to unsigned before doing bit shift
This commit is contained in:
Antoine SOULIER
2023-05-08 09:15:23 -07:00
committed by GitHub

View File

@@ -322,7 +322,7 @@ static inline void accu_load(struct lc3_bits_accu *accu,
for ( ; nbytes; nbytes--) {
accu->v >>= 8;
accu->v |= *(--buffer->p_bw) << (LC3_ACCU_BITS - 8);
accu->v |= (unsigned)*(--buffer->p_bw) << (LC3_ACCU_BITS - 8);
}
if (accu->n >= 8) {