summary |
shortlog |
log |
commit | commitdiff |
tree |
github
raw |
patch |
inline | side by side (from parent 1:
0e6ca00)
Trying to set an invalid URL on an http\Message instance might cause a
crash.
url = php_http_url_from_zval(zurl, ~0 TSRMLS_CC);
zend_restore_error_handling(&zeh TSRMLS_CC);
url = php_http_url_from_zval(zurl, ~0 TSRMLS_CC);
zend_restore_error_handling(&zeh TSRMLS_CC);
- if (php_http_url_is_empty(url)) {
+ if (url && php_http_url_is_empty(url)) {
php_http_url_free(&url);
php_http_throw(invalid_arg, "Cannot set http\\Message's request url to an empty string", NULL);
php_http_url_free(&url);
php_http_throw(invalid_arg, "Cannot set http\\Message's request url to an empty string", NULL);
PTR_SET(obj->message->http.info.request.url, url);
}
PTR_SET(obj->message->http.info.request.url, url);
}