diff options
author | William Wilgus <wilgus.william@gmail.com> | 2023-01-04 21:52:59 -0500 |
---|---|---|
committer | William Wilgus <wilgus.william@gmail.com> | 2023-01-04 22:00:25 -0500 |
commit | 9367ef1ed6b78d6bc078620009e383b3deae60b2 (patch) | |
tree | 49ba08351eca22982322f2cd063a99ef34ce2e92 /firmware | |
parent | ea33e660211ea762e0ab4b820b500db1b0c91337 (diff) | |
download | rockbox-9367ef1ed6b78d6bc078620009e383b3deae60b2.tar.gz rockbox-9367ef1ed6b78d6bc078620009e383b3deae60b2.zip |
[BugFix] Fix some Shif related UB -- ASAN
these are the low hanging fruit identified by ASAN
cast the byte values before shift
Change-Id: Ifc5645354a10c15ccd09d1343e1705857a51e011
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/export/pcm_sampr.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/firmware/export/pcm_sampr.h b/firmware/export/pcm_sampr.h index 70f2dc2ba2..fc48a943fd 100644 --- a/firmware/export/pcm_sampr.h +++ b/firmware/export/pcm_sampr.h | |||
@@ -427,10 +427,10 @@ extern const unsigned long rec_freq_sampr[REC_NUM_FREQ]; | |||
427 | 427 | ||
428 | #ifdef CONFIG_SAMPR_TYPES | 428 | #ifdef CONFIG_SAMPR_TYPES |
429 | 429 | ||
430 | #define SAMPR_TYPE_MASK (0xff << 24) | 430 | #define SAMPR_TYPE_MASK (0xffu << 24) |
431 | #define SAMPR_TYPE_PLAY (0x00 << 24) | 431 | #define SAMPR_TYPE_PLAY (0x00u << 24) |
432 | #ifdef HAVE_RECORDING | 432 | #ifdef HAVE_RECORDING |
433 | #define SAMPR_TYPE_REC (0x01 << 24) | 433 | #define SAMPR_TYPE_REC (0x01u << 24) |
434 | #endif | 434 | #endif |
435 | 435 | ||
436 | #ifndef PCM_SAMPR_CONFIG_ONLY | 436 | #ifndef PCM_SAMPR_CONFIG_ONLY |