sas             Sat Sep 20 12:10:50 2003 EDT

  Modified files:              
    /php-src/ext/standard       string.c 
  Log:
  MFB Avoid zero-length keys which result in a spinning process
  
  
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.396 php-src/ext/standard/string.c:1.397
--- php-src/ext/standard/string.c:1.396 Tue Aug 26 20:43:54 2003
+++ php-src/ext/standard/string.c       Sat Sep 20 12:10:49 2003
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: string.c,v 1.396 2003/08/27 00:43:54 pollita Exp $ */
+/* $Id: string.c,v 1.397 2003/09/20 16:10:49 sas Exp $ */
 
 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
@@ -2256,6 +2256,9 @@
                switch (zend_hash_get_current_key_ex(hash, &string_key, 
&string_key_len, &num_key, 0, &hpos)) {
                        case HASH_KEY_IS_STRING:
                                len = string_key_len-1;
+                               if (len < 1) {
+                                       RETURN_FALSE;
+                               }
                                if (len > maxlen) {
                                        maxlen = len;
                                }

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to