summaryrefslogtreecommitdiff
path: root/src/lib/ecore_file/ecore_file_download.c
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2013-08-05 10:37:15 +0100
committerChris Michael <cp.michael@samsung.com>2013-08-05 10:37:15 +0100
commit62401c257a562c5fb20b9206be862de23ec7315c (patch)
tree334cad4cff49058539e592b4583e2317083089a5 /src/lib/ecore_file/ecore_file_download.c
parent8b93eaf4c81dc4540ace1b56ad4e9b64d3a2fe66 (diff)
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>
Diffstat (limited to 'src/lib/ecore_file/ecore_file_download.c')
-rw-r--r--src/lib/ecore_file/ecore_file_download.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/ecore_file/ecore_file_download.c b/src/lib/ecore_file/ecore_file_download.c
index 9c80c2b159..92a701b6d7 100644
--- a/src/lib/ecore_file/ecore_file_download.c
+++ b/src/lib/ecore_file/ecore_file_download.c
@@ -126,8 +126,10 @@ _ecore_file_download(const char *url,
126 126
127 url += 7; 127 url += 7;
128 /* skip hostname */ 128 /* skip hostname */
129 url = strchr(url, '/'); 129 if ((url = strchr(url, '/')))
130 return ecore_file_cp(url, dst); 130 return ecore_file_cp(url, dst);
131 else
132 return EINA_FALSE;
131 } 133 }
132#ifdef HAVE_CURL 134#ifdef HAVE_CURL
133 else if ((!strncmp(url, "http://", 7)) || (!strncmp(url, "https://", 8)) || 135 else if ((!strncmp(url, "http://", 7)) || (!strncmp(url, "https://", 8)) ||