iliaa Sun Oct 17 14:41:30 2004 EDT
Modified files: (Branch: PHP_4_3)
/php-src NEWS
/php-src/ext/standard string.c
Log:
MFH: Fixed a bug in addslashes() handling of the '\0' character.
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1247.2.739&r2=1.1247.2.740&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.739 php-src/NEWS:1.1247.2.740
--- php-src/NEWS:1.1247.2.739 Tue Oct 5 19:55:21 2004
+++ php-src/NEWS Sun Oct 17 14:41:29 2004
@@ -1,6 +1,7 @@
PHP 4 NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2004, Version 4.3.10
+- Fixed a bug in addslashes() handling of the '\0' character. (Ilia)
- Backported Marcus' foreach() speedup patch from PHP 5.x. (Derick)
- Fixed potential problems with unserializing invalid serialize data. (Marcus)
- Fixed bug #30282 (segfault when using unknown/unsupported
http://cvs.php.net/diff.php/php-src/ext/standard/string.c?r1=1.333.2.44&r2=1.333.2.45&ty=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.333.2.44
php-src/ext/standard/string.c:1.333.2.45
--- php-src/ext/standard/string.c:1.333.2.44 Sun Jul 11 17:24:47 2004
+++ php-src/ext/standard/string.c Sun Oct 17 14:41:30 2004
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: string.c,v 1.333.2.44 2004/07/11 21:24:47 andrey Exp $ */
+/* $Id: string.c,v 1.333.2.45 2004/10/17 18:41:30 iliaa Exp $ */
/* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
@@ -2443,7 +2443,13 @@
p = str;
if (!type) {
while (p < e) {
- if (php_esc_list[(int)(unsigned char)*p]) {
+ int c = php_esc_list[(int)(unsigned char)*p];
+ if (c == 2) {
+ *ps++ = '\\';
+ *ps++ = '0';
+ p++;
+ continue;
+ } else if (c) {
*ps++ = '\\';
}
*ps++ = *p++;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php