From 08b56582b2b7689a42369b4695b75e9c11f16b93 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 8 Jul 2015 16:52:40 +0200 Subject: [PATCH] (task_file_transfer.c) Add workaround for bogus file transfer requests --- tasks/task_file_transfer.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tasks/task_file_transfer.c b/tasks/task_file_transfer.c index 20cf358464..18ac99d795 100644 --- a/tasks/task_file_transfer.c +++ b/tasks/task_file_transfer.c @@ -420,7 +420,22 @@ static int rarch_main_data_nbio_iterate_poll(nbio_handle_t *nbio) goto error; if (str_list->size > 0) + { + unsigned elem0_hash = 0; strlcpy(elem0, str_list->elems[0].data, sizeof(elem0)); + elem0_hash = djb2_calculate(elem0); + + /* TODO/FIXME - should be able to deal with this + * in a better way. */ + switch(elem0_hash) + { + case CB_MENU_WALLPAPER: + case CB_MENU_BOXART: + goto error; + default: + break; + } + } if (str_list->size > 1) cb_type_hash = djb2_calculate(str_list->elems[1].data);