tony2001 Wed Dec 20 23:36:56 2006 UTC
Modified files: (Branch: PHP_5_2)
/php-src/ext/standard string.c
Log:
MFH
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.445.2.14.2.34&r2=1.445.2.14.2.35&diff_format=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.445.2.14.2.34
php-src/ext/standard/string.c:1.445.2.14.2.35
--- php-src/ext/standard/string.c:1.445.2.14.2.34 Wed Dec 20 23:30:30 2006
+++ php-src/ext/standard/string.c Wed Dec 20 23:36:56 2006
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: string.c,v 1.445.2.14.2.34 2006/12/20 23:30:30 tony2001 Exp $ */
+/* $Id: string.c,v 1.445.2.14.2.35 2006/12/20 23:36:56 tony2001 Exp $ */
/* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
@@ -4045,7 +4045,13 @@
int php_tag_find(char *tag, int len, char *set) {
char c, *n, *t;
int state=0, done=0;
- char *norm = emalloc(len+1);
+ char *norm;
+
+ if (len <= 0) {
+ return 0;
+ }
+
+ norm = emalloc(len+1);
n = norm;
t = tag;
@@ -4055,9 +4061,6 @@
and turn any <a whatever...> into just <a> and any </tag>
into <tag>
*/
- if (!len) {
- return 0;
- }
while (!done) {
switch (c) {
case '<':
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php