summaryrefslogtreecommitdiff
path: root/src/lib/efreet/efreet_uri.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lib/efreet/efreet_uri.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/efreet/efreet_uri.c b/src/lib/efreet/efreet_uri.c
index 20ebe391b0..236f7e519c 100644
--- a/src/lib/efreet/efreet_uri.c
+++ b/src/lib/efreet/efreet_uri.c
@@ -38,7 +38,7 @@ efreet_uri_decode(const char *full_uri)
38 38
39 /* parse protocol */ 39 /* parse protocol */
40 p = full_uri; 40 p = full_uri;
41 for (i = 0; *p != ':' && *p != '\0' && i < 64; p++, i++) 41 for (i = 0; *p != ':' && *p != '\0' && i < (64 - 1); p++, i++)
42 protocol[i] = *p; 42 protocol[i] = *p;
43 protocol[i] = '\0'; 43 protocol[i] = '\0';
44 44
@@ -46,7 +46,7 @@ efreet_uri_decode(const char *full_uri)
46 p += 3; 46 p += 3;
47 if (*p != '/') 47 if (*p != '/')
48 { 48 {
49 for (i = 0; *p != '/' && *p != '\0' && i < _POSIX_HOST_NAME_MAX; p++, i++) 49 for (i = 0; *p != '/' && *p != '\0' && i < (_POSIX_HOST_NAME_MAX - 1); p++, i++)
50 hostname[i] = *p; 50 hostname[i] = *p;
51 hostname[i] = '\0'; 51 hostname[i] = '\0';
52 } 52 }
@@ -55,7 +55,7 @@ efreet_uri_decode(const char *full_uri)
55 55
56 /* parse path */ 56 /* parse path */
57 /* See http://www.faqs.org/rfcs/rfc1738.html for the escaped chars */ 57 /* See http://www.faqs.org/rfcs/rfc1738.html for the escaped chars */
58 for (i = 0; *p != '\0' && i < PATH_MAX; i++, p++) 58 for (i = 0; *p != '\0' && i < (PATH_MAX - 1); i++, p++)
59 { 59 {
60 if (*p == '%') 60 if (*p == '%')
61 { 61 {