forked from enlightenment/efl
strchr can return NULL, so check validity before tryint to pass NULL
to ecore_file_cp. Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
8b93eaf4c8
commit
62401c257a
|
@ -126,8 +126,10 @@ _ecore_file_download(const char *url,
|
|||
|
||||
url += 7;
|
||||
/* skip hostname */
|
||||
url = strchr(url, '/');
|
||||
return ecore_file_cp(url, dst);
|
||||
if ((url = strchr(url, '/')))
|
||||
return ecore_file_cp(url, dst);
|
||||
else
|
||||
return EINA_FALSE;
|
||||
}
|
||||
#ifdef HAVE_CURL
|
||||
else if ((!strncmp(url, "http://", 7)) || (!strncmp(url, "https://", 8)) ||
|
||||
|
|
Loading…
Reference in New Issue