]> granicus.if.org Git - php/commitdiff
- fix #49372, segfault in php_curl_option_url
authorPierre Joye <pajoye@php.net>
Wed, 26 Aug 2009 22:24:10 +0000 (22:24 +0000)
committerPierre Joye <pajoye@php.net>
Wed, 26 Aug 2009 22:24:10 +0000 (22:24 +0000)
NEWS
ext/curl/interface.c

diff --git a/NEWS b/NEWS
index 217eb4421cb4008904d14da86ff23f4ad5511bc1..6c05595ad6d586bef99e89018c632e08b1385acb 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -28,6 +28,7 @@ PHP                                                                        NEWS
 - Fixed memory leak in stream_is_local(). (Felipe, Tony)
 - Fixed BC break in mime_content_type(), removes the content encoding. (Scott) 
 
+- Fixed bug #49372 (segfault in php_curl_option_curl). (Pierre)
 - Fixed bug #49306 (inside pdo_mysql default socket settings are ignored).
   (Ilia)
 - Fixed bug #49289 (bcmath module doesn't compile with phpize configure).
index 620eae4284b0bbe55ae1df7e76db495bee1b94e1..641f0f3b9fa3899698faf5eb42502e166c43fb34 100644 (file)
@@ -183,7 +183,7 @@ static int php_curl_option_url(php_curl *ch, const char *url, const int len) /*
                        return 0;
                }
 
-               if (!strncasecmp("file", uri->scheme, sizeof("file"))) {
+               if (uri->scheme && !strncasecmp("file", uri->scheme, sizeof("file"))) {
                        php_error_docref(NULL TSRMLS_CC, E_WARNING, "Protocol 'file' disabled in cURL");
                        php_url_free(uri);
                        return 0;