devilhorns pushed a commit to branch master.
commit 62401c257a562c5fb20b9206be862de23ec7315c
Author: Chris Michael <[email protected]>
Date: Mon Aug 5 10:37:15 2013 +0100
strchr can return NULL, so check validity before tryint to pass NULL
to ecore_file_cp.
Signed-off-by: Chris Michael <[email protected]>
---
src/lib/ecore_file/ecore_file_download.c | 6 ++++--
1 file 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 9c80c2b..92a701b 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,
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)) ||
--
------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent
caught up. So what steps can you take to put your SQL databases under
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk