iliaa           Tue Apr  1 19:25:57 2003 EDT

  Modified files:              (Branch: PHP_4_3)
    /php4/ext/standard  string.c 
  Log:
  MFH
  
  
Index: php4/ext/standard/string.c
diff -u php4/ext/standard/string.c:1.333.2.18 php4/ext/standard/string.c:1.333.2.19
--- php4/ext/standard/string.c:1.333.2.18       Fri Mar  7 08:42:20 2003
+++ php4/ext/standard/string.c  Tue Apr  1 19:25:57 2003
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: string.c,v 1.333.2.18 2003/03/07 13:42:20 ddhill Exp $ */
+/* $Id: string.c,v 1.333.2.19 2003/04/02 00:25:57 iliaa Exp $ */
 
 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
@@ -3531,6 +3531,10 @@
        
        /* Initialize the result string */      
        result_len = Z_STRLEN_PP(input_str) * Z_LVAL_PP(mult);
+       if (result_len < 1 || result_len > 2147483647) {
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "You may not create 
strings longer then 2147483647 bytes");
+               RETURN_FALSE;
+       }
        result = (char *)emalloc(result_len + 1);
        
        /* Heavy optimization for situations where input string is 1 byte long */



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

Reply via email to