From: Michael Wallner Date: Thu, 5 May 2011 06:02:50 +0000 (+0000) Subject: Fix Bug #17806 Segmentation fault when passing invalid url to http_get() X-Git-Tag: RELEASE_1_7_1~3 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=126a191f046d863b310d6b29526d84fd00202e6a;p=m6w6%2Fext-http Fix Bug #17806 Segmentation fault when passing invalid url to http_get() --- diff --git a/http_request_api.c b/http_request_api.c index d328161..1b0c59e 100644 --- a/http_request_api.c +++ b/http_request_api.c @@ -615,7 +615,10 @@ PHP_HTTP_API STATUS _http_request_prepare(http_request *request, HashTable *opti TSRMLS_FETCH_FROM_CTX(request->tsrm_ls); HTTP_CHECK_CURL_INIT(request->ch, http_curl_init(request), return FAILURE); - + + if (!request->url) { + return FAILURE; + } if (!(storage = http_request_storage_get(request->ch))) { return FAILURE; }