summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfoobar <sniper@php.net>2001-05-15 02:04:38 +0000
committerfoobar <sniper@php.net>2001-05-15 02:04:38 +0000
commite144aa37010a079bfbfe3fd2b1b775bcccb3fbc4 (patch)
tree17ba096b56c2eb3dd5eab69a9b9ae258c21a6eb8
parent098a1c5fc2d69ae2c627444af162516ddb80b645 (diff)
downloadphp-git-e144aa37010a079bfbfe3fd2b1b775bcccb3fbc4.tar.gz
Fix bug: #1249
-rw-r--r--ext/standard/url.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/standard/url.c b/ext/standard/url.c
index 75a2c9f80b..3f5ea0aad8 100644
--- a/ext/standard/url.c
+++ b/ext/standard/url.c
@@ -87,27 +87,27 @@ php_url *url_parse(char *str)
return NULL;
}
/* no processing necessary on the scheme */
- if (subs[2].rm_so != -1 && subs[2].rm_so < length) {
+ if (subs[2].rm_so != -1 && subs[2].rm_so <= length) {
ret->scheme = estrndup(str + subs[2].rm_so, subs[2].rm_eo - subs[2].rm_so);
}
/* the path to the resource */
- if (subs[5].rm_so != -1 && subs[5].rm_so < length) {
+ if (subs[5].rm_so != -1 && subs[5].rm_so <= length) {
ret->path = estrndup(str + subs[5].rm_so, subs[5].rm_eo - subs[5].rm_so);
}
/* the query part */
- if (subs[7].rm_so != -1 && subs[7].rm_so < length) {
+ if (subs[7].rm_so != -1 && subs[7].rm_so <= length) {
ret->query = estrndup(str + subs[7].rm_so, subs[7].rm_eo - subs[7].rm_so);
}
/* the fragment */
- if (subs[9].rm_so != -1 && subs[9].rm_so < length) {
+ if (subs[9].rm_so != -1 && subs[9].rm_so <= length) {
ret->fragment = estrndup(str + subs[9].rm_so, subs[9].rm_eo - subs[9].rm_so);
}
/* extract the username, pass, and port from the hostname */
- if (subs[4].rm_so != -1 && subs[4].rm_so < length) {
+ if (subs[4].rm_so != -1 && subs[4].rm_so <= length) {
int cerr;
/* extract username:pass@host:port from regex results */