mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-28 02:30:35 +00:00
task_pl_thumbnail_download.c - put char string of 8192 length
on heap for all platforms
This commit is contained in:
parent
ba7900a3fb
commit
cc8160d044
@ -89,11 +89,7 @@ static bool get_thumbnail_paths(
|
||||
char *path, size_t path_size,
|
||||
char *url, size_t url_size)
|
||||
{
|
||||
#if defined(__PSL1GHT__) || defined(__PS3__)
|
||||
char *raw_url;
|
||||
#else
|
||||
char raw_url[8192];
|
||||
#endif
|
||||
char content_dir[PATH_MAX_LENGTH];
|
||||
char tmp_buf[PATH_MAX_LENGTH];
|
||||
const char *system = NULL;
|
||||
@ -153,12 +149,10 @@ static bool get_thumbnail_paths(
|
||||
if (string_is_empty(path))
|
||||
return false;
|
||||
|
||||
#if defined(__PSL1GHT__) || defined(__PS3__)
|
||||
raw_url = (char*)malloc(8192 * sizeof(char));
|
||||
|
||||
if (!raw_url)
|
||||
return false;
|
||||
#endif
|
||||
raw_url[0] = '\0';
|
||||
|
||||
/* Generate remote path */
|
||||
@ -170,19 +164,13 @@ static bool get_thumbnail_paths(
|
||||
);
|
||||
|
||||
if (string_is_empty(raw_url))
|
||||
#if defined(__PSL1GHT__) || defined(__PS3__)
|
||||
{
|
||||
free(raw_url);
|
||||
return false;
|
||||
}
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
|
||||
net_http_urlencode_full(url, raw_url, url_size);
|
||||
#if defined(__PSL1GHT__) || defined(__PS3__)
|
||||
free(raw_url);
|
||||
#endif
|
||||
|
||||
if (string_is_empty(url))
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user