scottmac                Mon Dec  8 02:33:47 2008 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src/ext/openssl        xp_ssl.c 
    /php-src    NEWS 
  Log:
  Fix bug #46748, segfault when SSL has more than one error message.
  
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/openssl/xp_ssl.c?r1=1.22.2.3.2.14&r2=1.22.2.3.2.15&diff_format=u
Index: php-src/ext/openssl/xp_ssl.c
diff -u php-src/ext/openssl/xp_ssl.c:1.22.2.3.2.14 
php-src/ext/openssl/xp_ssl.c:1.22.2.3.2.15
--- php-src/ext/openssl/xp_ssl.c:1.22.2.3.2.14  Sun Nov 16 23:12:38 2008
+++ php-src/ext/openssl/xp_ssl.c        Mon Dec  8 02:33:46 2008
@@ -16,7 +16,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: xp_ssl.c,v 1.22.2.3.2.14 2008/11/16 23:12:38 pajoye Exp $ */
+/* $Id: xp_ssl.c,v 1.22.2.3.2.15 2008/12/08 02:33:46 scottmac Exp $ */
 
 #include "php.h"
 #include "ext/standard/file.h"
@@ -152,9 +152,10 @@
                                                        
ERR_error_string_n(ecode, esbuf, sizeof(esbuf) - 1);
                                                }
                                                code = strlen(esbuf);
-                                               esbuf[code] = '\0';
 
                                                ebuf = erealloc(ebuf, ebuf_size 
+ code + 1);
+                                               ebuf_size += code;
+
                                                if (wptr == NULL) {
                                                        wptr = ebuf;
                                                }       
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1353&r2=1.2027.2.547.2.1354&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1353 php-src/NEWS:1.2027.2.547.2.1354
--- php-src/NEWS:1.2027.2.547.2.1353    Sun Dec  7 19:28:00 2008
+++ php-src/NEWS        Mon Dec  8 02:33:46 2008
@@ -2,6 +2,7 @@
 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 ?? ??? 2009, PHP 5.2.9
 - Fixed bug #46782 (fastcgi.c parse error). (Matt)
+- Fixed bug #46748 (Segfault when an SSL error has more than one error.) 
(Scott)
 - Fixed bug #46739 (array returned by curl_getinfo should contain content_type 
key). 
   (Mikko)
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to