From 01c6748f72b51357d53ef0df23d8ecc4283776fb Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 26 Oct 2016 09:30:00 +0200 Subject: [PATCH] Prevent uninitialized variable Coverity warning --- menu/cbs/menu_cbs_ok.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index 661d14517f..fe664b1848 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -87,11 +87,11 @@ static void cb_net_generic_subdir(void *task_data, void *user_data, const char * http_transfer_data_t *data = (http_transfer_data_t*)task_data; menu_file_transfer_t *state = (menu_file_transfer_t*)user_data; + subdir_path[0] = '\0'; + if (!data || err) goto finish; - subdir_path[0] = '\0'; - memcpy(subdir_path, data->data, data->len * sizeof(char)); subdir_path[data->len] = '\0';