tony2001 Mon Mar 26 10:28:29 2007 UTC
Modified files: (Branch: PHP_4_4)
/php-src NEWS
/php-src/ext/standard string.c
Log:
MFH: fix #40915 (addcslashes unexpected behavior with binary input)
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.1247.2.920.2.214&r2=1.1247.2.920.2.215&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.920.2.214 php-src/NEWS:1.1247.2.920.2.215
--- php-src/NEWS:1.1247.2.920.2.214 Sun Mar 25 15:27:51 2007
+++ php-src/NEWS Mon Mar 26 10:28:28 2007
@@ -12,6 +12,7 @@
- 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 #40915 (addcslashes unexpected behavior with binary input). (Tony)
- 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
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.333.2.52.2.10&r2=1.333.2.52.2.11&diff_format=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.333.2.52.2.10
php-src/ext/standard/string.c:1.333.2.52.2.11
--- php-src/ext/standard/string.c:1.333.2.52.2.10 Thu Feb 15 09:31:01 2007
+++ php-src/ext/standard/string.c Mon Mar 26 10:28:28 2007
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: string.c,v 1.333.2.52.2.10 2007/02/15 09:31:01 tony2001 Exp $ */
+/* $Id: string.c,v 1.333.2.52.2.11 2007/03/26 10:28:28 tony2001 Exp $ */
/* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
@@ -2220,11 +2220,8 @@
RETURN_STRINGL(Z_STRVAL_PP(str), Z_STRLEN_PP(str), 1);
}
- RETURN_STRING(php_addcslashes(Z_STRVAL_PP(str),
- Z_STRLEN_PP(str),
- &Z_STRLEN_P(return_value), 0,
- Z_STRVAL_PP(what),
- Z_STRLEN_PP(what) TSRMLS_CC), 0);
+ Z_STRVAL_P(return_value) = php_addcslashes(Z_STRVAL_PP(str),
Z_STRLEN_PP(str), &Z_STRLEN_P(return_value), 0, Z_STRVAL_PP(what),
Z_STRLEN_PP(what) TSRMLS_CC);
+ RETURN_STRINGL(Z_STRVAL_P(return_value), Z_STRLEN_P(return_value), 0);
}
/* }}} */
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php