cvs: php-src(PHP_4_4) /ext/standard string.c
| From: | Antony Dovgal | Date: | Wed, 20 Dec 2006 23:37:28 +0000 |
| Subject: | cvs: php-src(PHP_4_4) /ext/standard string.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-42242@lists.php.net to get a copy of this message | ||
tony2001 Wed Dec 20 23:37:28 2006 UTC
Modified files: (Branch: PHP_4_4)
/php-src/ext/standard string.c
Log:
MFH
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.333.2.52.2.6&r2=1.333.2.52.2.7&diff_format=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.333.2.52.2.6 php-src/ext/standard/string.c:1.333.2.52.2.7
--- php-src/ext/standard/string.c:1.333.2.52.2.6 Thu Aug 10 17:27:12 2006
+++ php-src/ext/standard/string.c Wed Dec 20 23:37:27 2006
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: string.c,v 1.333.2.52.2.6 2006/08/10 17:27:12 iliaa Exp $ */
+/* $Id: string.c,v 1.333.2.52.2.7 2006/12/20 23:37:27 tony2001 Exp $ */
/* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
@@ -3224,7 +3224,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;
@@ -3234,9 +3240,6 @@
and turn any <a whatever...> into just <a> and any </tag>
into <tag>
*/
- if (!len) {
- return 0;
- }
while (!done) {
switch (c) {
case '<':