Merge pull request #28 from rc0r/rc0r-fixes
authorMichael Wallner <mike@php.net>
Wed, 9 Mar 2016 08:34:07 +0000 (09:34 +0100)
committerMichael Wallner <mike@php.net>
Wed, 9 Mar 2016 08:34:07 +0000 (09:34 +0100)
Possible null pointer dereference in php_http_url_mod() fixed.

src/php_http_url.c

index cce4ba7b16ed40bd9944a74243a788eec4a501e1..4009add52fc369a78c1741b9c2d12a2466bc1516 100644 (file)
@@ -263,6 +263,7 @@ php_http_url_t *php_http_url_mod(const php_http_url_t *old_url, const php_http_u
 
        /* replace directory references if path is not a single slash */
        if ((flags & PHP_HTTP_URL_SANITIZE_PATH)
+       &&      url(buf)->path
        &&      url(buf)->path[0] && url(buf)->path[1]) {
                char *ptr, *end = url(buf)->path + strlen(url(buf)->path) + 1;