php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #68089
Patch fix-url-5.4 revision 2014-09-29 01:07 UTC by stas@php.net
Patch fix-options-5.5 revision 2014-09-29 01:01 UTC by stas@php.net
revision 2014-09-29 00:57 UTC by stas@php.net
revision 2014-09-29 00:56 UTC by stas@php.net
Patch fix-5.5 revision 2014-09-29 00:54 UTC by stas@php.net
Patch bug68089.diff revision 2014-09-25 10:40 UTC by johannes@php.net

Patch bug68089.diff for *General Issues Bug #68089

Patch version 2014-09-25 10:40 UTC

Return to Bug #68089 | Download this patch
This patch is obsolete

Obsoleted by patches:

Patch Revisions:

Developer: johannes@php.net

diff --git a/ext/curl/interface.c b/ext/curl/interface.c
index d7cacf5..094c8ae 100644
--- a/ext/curl/interface.c
+++ b/ext/curl/interface.c
@@ -170,6 +170,11 @@ static int php_curl_option_str(php_curl *ch, zend_long option, const char *str,
 {
 	CURLcode error = CURLE_OK;
 
+	if (strlen(str) != len) {
+		php_error_docref(NULL TSRMLS_CC, E_WARNING, "Curl option %d contains invalid characters (\\0) ignoring");;
+		return FAILURE;
+	}
+
 #if LIBCURL_VERSION_NUM >= 0x071100
 	if (make_copy) {
 #endif
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 11:01:29 2024 UTC