Commit 0b064200 authored by Jeffrey Lee's avatar Jeffrey Lee
Browse files

Fix null pointer dereference in event_help_request when no menu is active

Detail:
  c/events - event_help_request was dereferencing global_menu.top before checking if it was null, leading to a crash if no menu was active at the time of the request.
Admin:
  Tested on BB-xM with high processor vectors


Version 0.37. Tagged as 'Menu-0_37'
parent 803a18a1
/* (0.36)
/* (0.37)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 0.36
#define Module_MajorVersion_CMHG 0.37
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 04 May 2000
#define Module_Date_CMHG 09 Jul 2012
#define Module_MajorVersion "0.36"
#define Module_Version 36
#define Module_MajorVersion "0.37"
#define Module_Version 37
#define Module_MinorVersion ""
#define Module_Date "04 May 2000"
#define Module_Date "09 Jul 2012"
#define Module_FullVersion "0.36"
#define Module_ApplicationDate "09-Jul-12"
#define Module_ComponentName "Menu"
#define Module_ComponentPath "castle/RiscOS/Sources/Toolbox/Menu"
#define Module_FullVersion "0.37"
#define Module_HelpVersion "0.37 (09 Jul 2012)"
#define Module_LibraryVersionInfo "0:37"
......@@ -219,7 +219,7 @@ _kernel_oserror *event_help_request (wimp_Message message_block, TaskDescriptor
int buffer[64], /* menu list buffer */
*pposition,
str_len;
ObjectID object_id = global_menu.top->hdr.object_id,
ObjectID object_id,
submenu;
ComponentID component_id;
......@@ -242,6 +242,8 @@ _kernel_oserror *event_help_request (wimp_Message message_block, TaskDescriptor
return NULL;
}
object_id = menu_int->hdr.object_id;
while (*(pposition+1) != -1) {
int_entry = menu_internal_entry (menu_int,*pposition++);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment