iliaa           Fri Sep  7 02:28:27 2007 UTC

  Modified files:              
    /php-src/ext/standard       string.c 
  Log:
  Added missing safety checks for 2nd parameter of setlocale() function
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.650&r2=1.651&diff_format=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.650 php-src/ext/standard/string.c:1.651
--- php-src/ext/standard/string.c:1.650 Mon Jul 23 13:27:34 2007
+++ php-src/ext/standard/string.c       Fri Sep  7 02:28:26 2007
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: string.c,v 1.650 2007/07/23 13:27:34 jani Exp $ */
+/* $Id: string.c,v 1.651 2007/09/07 02:28:26 iliaa Exp $ */
 
 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
@@ -6120,6 +6120,10 @@
                        loc = NULL;
                } else {
                        loc = Z_STRVAL_PP(plocale);
+                       if (Z_STRLEN_PP(plocale) >= 255) {
+                               php_error_docref(NULL TSRMLS_CC, E_WARNING, 
"Specified locale name is too long");
+                               break;
+                       }
                }
 
                retval = setlocale (cat, loc);

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

Reply via email to