mirror of
https://github.com/libretro/RetroArch.git
synced 2024-12-11 10:13:53 +00:00
Merge pull request #6415 from fr500/master
fix potential crash on task_push_http_transfer
This commit is contained in:
commit
4d8d6478f4
@ -2090,7 +2090,7 @@ MSG_HASH(MSG_DISK_EJECTED,
|
||||
MSG_HASH(MSG_DOWNLOADING,
|
||||
"Downloading")
|
||||
MSG_HASH(MSG_INDEX_FILE,
|
||||
"Index File")
|
||||
"index")
|
||||
MSG_HASH(MSG_DOWNLOAD_FAILED,
|
||||
"Download failed")
|
||||
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;
|
||||
char tmp[255];
|
||||
char* s = NULL;
|
||||
const char* s = NULL;
|
||||
retro_task_t *t = NULL;
|
||||
http_handle_t *http = NULL;
|
||||
|
||||
@ -298,7 +298,10 @@ static void* task_push_http_transfer_generic(
|
||||
t->user_data = user_data;
|
||||
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"))
|
||||
{
|
||||
@ -307,7 +310,7 @@ static void* task_push_http_transfer_generic(
|
||||
}
|
||||
else
|
||||
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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user