tony2001 Wed Oct 4 10:52:33 2006 UTC
Modified files:
/php-src/ext/standard string.c
Log:
return false on invalid mode and don't segfault
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.600&r2=1.601&diff_format=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.600 php-src/ext/standard/string.c:1.601
--- php-src/ext/standard/string.c:1.600 Tue Oct 3 18:13:36 2006
+++ php-src/ext/standard/string.c Wed Oct 4 10:52:32 2006
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: string.c,v 1.600 2006/10/03 18:13:36 andrei Exp $ */
+/* $Id: string.c,v 1.601 2006/10/04 10:52:32 tony2001 Exp $ */
/* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
@@ -6465,6 +6465,7 @@
}
if (UG(unicode) && mode != 1) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Only
mode=1 is supported with Unicode strings");
+ RETURN_FALSE;
}
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php