mirror of
https://github.com/libretro/RetroArch
synced 2025-02-11 15:40:28 +00:00
fix potential crash on task_push_http_transfer
This commit is contained in:
parent
a8fc4b204a
commit
fd9d8c9512
@ -2090,7 +2090,7 @@ MSG_HASH(MSG_DISK_EJECTED,
|
|||||||
MSG_HASH(MSG_DOWNLOADING,
|
MSG_HASH(MSG_DOWNLOADING,
|
||||||
"Downloading")
|
"Downloading")
|
||||||
MSG_HASH(MSG_INDEX_FILE,
|
MSG_HASH(MSG_INDEX_FILE,
|
||||||
"Index File")
|
"index")
|
||||||
MSG_HASH(MSG_DOWNLOAD_FAILED,
|
MSG_HASH(MSG_DOWNLOAD_FAILED,
|
||||||
"Download failed")
|
"Download failed")
|
||||||
MSG_HASH(MSG_ERROR,
|
MSG_HASH(MSG_ERROR,
|
||||||
|
3715
retroarch.cfg
3715
retroarch.cfg
File diff suppressed because it is too large
Load Diff
@ -249,7 +249,7 @@ static void* task_push_http_transfer_generic(
|
|||||||
{
|
{
|
||||||
task_finder_data_t find_data;
|
task_finder_data_t find_data;
|
||||||
char tmp[255];
|
char tmp[255];
|
||||||
char* s = NULL;
|
const char* s = NULL;
|
||||||
retro_task_t *t = NULL;
|
retro_task_t *t = NULL;
|
||||||
http_handle_t *http = NULL;
|
http_handle_t *http = NULL;
|
||||||
|
|
||||||
@ -298,7 +298,10 @@ static void* task_push_http_transfer_generic(
|
|||||||
t->user_data = user_data;
|
t->user_data = user_data;
|
||||||
t->progress = -1;
|
t->progress = -1;
|
||||||
|
|
||||||
s= ((file_transfer_t*)user_data)->path;
|
if (user_data != NULL)
|
||||||
|
s = ((file_transfer_t*)user_data)->path;
|
||||||
|
else
|
||||||
|
s = url;
|
||||||
|
|
||||||
if (strstr(s, ".index"))
|
if (strstr(s, ".index"))
|
||||||
{
|
{
|
||||||
@ -307,7 +310,7 @@ static void* task_push_http_transfer_generic(
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
snprintf(tmp, sizeof(tmp), "%s '%s'",
|
snprintf(tmp, sizeof(tmp), "%s '%s'",
|
||||||
msg_hash_to_str(MSG_DOWNLOADING), path_basename(s));
|
msg_hash_to_str(MSG_DOWNLOADING), s);
|
||||||
|
|
||||||
t->title = strdup(tmp);
|
t->title = strdup(tmp);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user