summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThies C. Arntzen <thies@php.net>1999-10-19 11:02:05 +0000
committerThies C. Arntzen <thies@php.net>1999-10-19 11:02:05 +0000
commit578c6035c8d54a8223b8ff2364f34902b144dc47 (patch)
tree38d174ff5aff87519760b03ab80b07a85d4bc8e9
parentb69656177bc0d528376ccd8c804faa135a4c78ba (diff)
downloadphp-git-578c6035c8d54a8223b8ff2364f34902b144dc47.tar.gz
(parse_url) fix for #2569: parse_url('-') crashes
@- Fixed parse_url('-') crash. (Thies)
-rw-r--r--ext/standard/url.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/standard/url.c b/ext/standard/url.c
index b6dc652555..612af418b8 100644
--- a/ext/standard/url.c
+++ b/ext/standard/url.c
@@ -140,7 +140,7 @@ url *url_parse(char *string)
}
efree(result);
}
- else if (!strcmp(ret->scheme, "http")) {
+ else if (ret->scheme && !strcmp(ret->scheme, "http")) {
STR_FREE(ret->scheme);
STR_FREE(ret->path);
STR_FREE(ret->query);