summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorShelley Chen <shchen@chromium.org>2017-01-27 15:23:29 -0800
committerchrome-bot <chrome-bot@chromium.org>2017-01-30 16:48:35 -0800
commit469d36aff53586629d54d82071c7d91c4ab70d84 (patch)
tree24d7f71ce383e0deb2731ddf1981c52d3a8e5a4c /firmware
parent8496157c62ef744381c9544ac8f16714b2b11fbc (diff)
downloadvboot-469d36aff53586629d54d82071c7d91c4ab70d84.tar.gz
poppy: Check NULL menu_array params in vb2_get_current_menu_size()
BUG=chrome-os-partner:61275 BRANCH=None TEST=None Change-Id: I1d88e552a4c9184061207a8e14e32dfb1a39745a Signed-off-by: Shelley Chen <shchen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/434248 Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'firmware')
-rw-r--r--firmware/lib/vboot_ui_menu.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/firmware/lib/vboot_ui_menu.c b/firmware/lib/vboot_ui_menu.c
index c2ec8cff..4635dd31 100644
--- a/firmware/lib/vboot_ui_menu.c
+++ b/firmware/lib/vboot_ui_menu.c
@@ -318,7 +318,8 @@ VbError_t vb2_get_current_menu_size(VB_MENU menu, char ***menu_array, int *size)
*size = 0;
return VBERROR_UNKNOWN;
}
- *menu_array = temp_menu;
+ if (menu_array)
+ *menu_array = temp_menu;
return VBERROR_SUCCESS;
}