Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

diacritic: Critical bugfixes

* When the codepoint > 0xffff, don't overflow past the end
of our diacritic table (Fixed by William Wilgus)
* Truncation of the 'info' field causes the RTL flag to be dropped
(RTL flag is b15 but we truncate it into an 8-bit variable)

Both bugs introduced in a2c10f6189 (September 2025)

Change-Id: Id5425606f2cf91d3b3a81f4b67a97d546de81e41

+10 -2
+10 -2
firmware/common/diacritic.c
··· 203 203 static uint8_t diacritic_mru[MRU_MAX_LEN]; 204 204 205 205 uint8_t i, itmp; 206 - uint8_t info, mru; 206 + uint8_t mru; 207 + uint16_t info; 207 208 208 - const struct diac_range *diac; 209 + const struct diac_range *diac = &diac_ranges[DIAC_NUM_RANGES - 1]; 210 + 211 + /* If the codepoint exceeds the terminating entry in our table 212 + then treat it as non-diacritic. */ 213 + if (char_code >= diac->base) 214 + goto bypass; 209 215 210 216 /* Search in MRU */ 211 217 for (mru = 0, i = 0; mru < mru_len; mru++) ··· 244 250 diacritic_mru[0] = i; 245 251 246 252 diac = &diac_ranges[i]; 253 + 254 + bypass: 247 255 info = diac->info; 248 256 249 257 /* Update RTL */