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.

Add a sanity-check to ensure only in-range subimages are referenced in %xd tags. Plus some tab policing.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16774 a1c6a512-1295-4272-9138-f99709370657

+5 -1
+5 -1
apps/gui/wps_parser.c
··· 443 443 444 444 if ((subimage = get_image_id(wps_bufptr[1])) != -1) 445 445 { 446 + /* Sanity check */ 447 + if (subimage >= wps_data->img[n].num_subimages) 448 + return WPS_ERROR_INVALID_PARAM; 449 + 446 450 /* Store sub-image number to display in high bits */ 447 451 token->value.i = n | (subimage << 8); 448 452 return 2; /* We have consumed 2 bytes */ ··· 1382 1386 *loaded = true; 1383 1387 1384 1388 /* Calculate and store height if this image has sub-images */ 1385 - if (n < MAX_IMAGES) 1389 + if (n < MAX_IMAGES) 1386 1390 wps_data->img[n].subimage_height = wps_data->img[n].bm.height / 1387 1391 wps_data->img[n].num_subimages; 1388 1392 }