]> granicus.if.org Git - php/commitdiff
fix #40831 (cURL extension doesn't clean up the buffer of reused handle)
authorAntony Dovgal <tony2001@php.net>
Thu, 15 Mar 2007 23:19:21 +0000 (23:19 +0000)
committerAntony Dovgal <tony2001@php.net>
Thu, 15 Mar 2007 23:19:21 +0000 (23:19 +0000)
NEWS
ext/curl/curl.c

diff --git a/NEWS b/NEWS
index b2eef28107b3e0b961154a115c3f696c3ae7f45d..604059dfaec4c47a86f6e5eae54419ff51c0dcd7 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -8,6 +8,8 @@ PHP 4                                                                      NEWS
 - Fixed CVE-2007-1001, GD wbmp used with invalid image size (Pierre)
 - Fixed CVE-2007-0455, Buffer overflow in gdImageStringFTEx (used by imagettf
   function) (Kees Cook, Pierre)
+- Fixed bug #40831 (cURL extension doesn't clean up the buffer of reused 
+  handle). (Tony)
 - Fixed bug #40747 (possible crash in session when save_path is out of 
   open_basedir). (Tony)
 - Fixed MOPB-8, XSS in phpinfo() (Joe Orton, Stas)
index c47c5609423abf16b705b33ab5de516e668cb767..7eb2dae3dbe411067daa9302e5c7e74ac4bbb5e1 100644 (file)
@@ -1262,10 +1262,6 @@ PHP_FUNCTION(curl_setopt)
 static void 
 cleanup_handle(php_curl *ch)
 {
-       if (ch->uses < 1) {
-               return;
-       }
-
        if (ch->handlers->write->buf.len > 0) {
                smart_str_free(&ch->handlers->write->buf);
                ch->handlers->write->buf.len = 0;