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.

Run-time validation of INT settings.

Check against min/max/step parameters

Many places this value is used as an index into an array; this will
help prevent array overflows and undefined/undesireable behavior.

Some fields accept arbitary values, continue to accept those.

Change-Id: Idbb5a17b7ceae5500660987703e2d6c16e920c92

+7 -1
+7 -1
apps/settings.c
··· 311 311 #endif 312 312 if (settings[i].cfg_vals == NULL) 313 313 { 314 - *(int*)settings[i].setting = atoi(value); 314 + if (settings[i].flags&F_ALLOW_ARBITRARY_VALS || 315 + (temp >= settings[i].int_setting->min && 316 + temp <= settings[i].int_setting->max && 317 + temp % settings[i].int_setting->step == 0)) 318 + { 319 + *(int*)settings[i].setting = atoi(value); 320 + } 315 321 } 316 322 else 317 323 {