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/export/pcm_sampr.h | |
parent | ea33e660211ea762e0ab4b820b500db1b0c91337 (diff) | |
download | rockbox-9367ef1ed6.tar.gz rockbox-9367ef1ed6.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/export/pcm_sampr.h')
-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]; #ifdef CONFIG_SAMPR_TYPES -#define SAMPR_TYPE_MASK (0xff << 24) -#define SAMPR_TYPE_PLAY (0x00 << 24) +#define SAMPR_TYPE_MASK (0xffu << 24) +#define SAMPR_TYPE_PLAY (0x00u << 24) #ifdef HAVE_RECORDING -#define SAMPR_TYPE_REC (0x01 << 24) +#define SAMPR_TYPE_REC (0x01u << 24) #endif #ifndef PCM_SAMPR_CONFIG_ONLY |