From d8f0df794d58c30fc2748b022ceeecefdcf0d850 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 26 Jan 2016 01:20:08 +0100 Subject: [PATCH] Prevent strlcpy if menu_path is NULL --- menu/cbs/menu_cbs_ok.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index bc8e7b8f42..dc19987328 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -412,7 +412,8 @@ static int rarch_defer_core_wrapper(size_t idx, size_t entry_idx, menu_entries_get_last_stack(&menu_path, &menu_label, NULL, NULL); - strlcpy(menu_path_new, menu_path, sizeof(menu_path_new)); + if (!string_is_empty(menu_path)) + strlcpy(menu_path_new, menu_path, sizeof(menu_path_new)); if ( string_is_equal(menu_label,