From: rc0r Date: Thu, 3 Mar 2016 14:05:33 +0000 (+0100) Subject: Possible null pointer dereference in php_http_url_mod() fixed. X-Git-Tag: RELEASE_3_0_1~2^2 X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=commitdiff_plain;h=1a80f78597fadaabc92b1e760fb26fb919ae2432 Possible null pointer dereference in php_http_url_mod() fixed. --- diff --git a/src/php_http_url.c b/src/php_http_url.c index cce4ba7..4009add 100644 --- a/src/php_http_url.c +++ b/src/php_http_url.c @@ -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;