summaryrefslogtreecommitdiff
path: root/src/lib/efreet/efreet_uri.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/efreet/efreet_uri.c')
-rw-r--r--src/lib/efreet/efreet_uri.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/efreet/efreet_uri.c b/src/lib/efreet/efreet_uri.c
index 9f468ce5df..44fe54a35f 100644
--- a/src/lib/efreet/efreet_uri.c
+++ b/src/lib/efreet/efreet_uri.c
@@ -22,13 +22,16 @@ efreet_uri_decode(const char *full_uri)
22 Efreet_Uri *uri; 22 Efreet_Uri *uri;
23 const char *p; 23 const char *p;
24 char scheme[64], authority[_POSIX_HOST_NAME_MAX], path[PATH_MAX]; 24 char scheme[64], authority[_POSIX_HOST_NAME_MAX], path[PATH_MAX];
25 char *sep;
25 int i = 0; 26 int i = 0;
26 27
27 EINA_SAFETY_ON_NULL_RETURN_VAL(full_uri, NULL); 28 EINA_SAFETY_ON_NULL_RETURN_VAL(full_uri, NULL);
28 29
29 /* An uri should be in the form <scheme>:[<authority>][<path>][<query>][<fragment>] */ 30 /* An uri should be in the form <scheme>:[<authority>][<path>][<query>][<fragment>] */
30 if (!strstr(full_uri, ":")) return NULL; 31 sep = strchr(full_uri, ':');
31 32 if (!sep) return NULL;
33 /* check if we have a Windows PATH, that is a letter follow by a colon */
34 if ((sep - full_uri) == 1) return NULL;
32 35
33 memset(scheme, 0, 64); 36 memset(scheme, 0, 64);
34 memset(authority, 0, _POSIX_HOST_NAME_MAX); 37 memset(authority, 0, _POSIX_HOST_NAME_MAX);