Rockbox

  • Status New
  • Percent Complete
    0%
  • Task Type Bugs
  • Category User Interface
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version Daily build (which?)
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by thomasjfox - 2011-03-13

FS#12008 - Empty menus lead to NULL pointer access

Hello,

empty menu items crash rockbox due to NULL pointer access.
Easily reproducable with the "LCD settings" in RaaA / SDL app build.

The resulting valgrind trace looks like this:
==22619== Invalid read of size 4
==22619== at 0x407FDA: do_menu (menu.c:555)
==22619== by 0x41B198: miscscrn (root_menu.c:323)
==22619== by 0x41B377: load_screen (root_menu.c:520)
==22619== by 0x41B72A: root_menu (root_menu.c:688)
==22619== by 0x406DFA: main (main.c:196)
==22619== Address 0x0 is not stack'd, malloc'd or (recently) free'd

Question:
Should we protect against "menu→submenus" being NULL or
should the menu system hide empty menus without any items at all?

Cheers,
Thomas

Doesn't crash on android. It's just empty.

press ACTION_STD_OK when you are in the empty menu…

That crashes indeed.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing