This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#12008 - Empty menus lead to NULL pointer access
Attached to Project:
Rockbox
Opened by Thomas Jarosch (thomasjfox) - Sunday, 13 March 2011, 10:59 GMT+2
Opened by Thomas Jarosch (thomasjfox) - Sunday, 13 March 2011, 10:59 GMT+2
|
DetailsHello,
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 |
This task depends upon
Doesn't crash on android. It's just empty.
press ACTION_STD_OK when you are in the empty menu...
That crashes indeed.