Skip to content

Commit

Permalink
- fix #49372, segfault in php_curl_option_url
Browse files Browse the repository at this point in the history
  • Loading branch information
pierrejoye committed Aug 26, 2009
1 parent 5d017c3 commit 137b921
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
2 changes: 1 addition & 1 deletion ext/curl/interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 137b921

Please sign in to comment.