hirokawa                Sun Feb 17 02:04:12 2008 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src/ext/mbstring       php_mbregex.c 
  Log:
  MF PHP5_3 (fixed #43994)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/php_mbregex.c?r1=1.53.2.1.2.6&r2=1.53.2.1.2.7&diff_format=u
Index: php-src/ext/mbstring/php_mbregex.c
diff -u php-src/ext/mbstring/php_mbregex.c:1.53.2.1.2.6 
php-src/ext/mbstring/php_mbregex.c:1.53.2.1.2.7
--- php-src/ext/mbstring/php_mbregex.c:1.53.2.1.2.6     Mon Dec 31 07:20:07 2007
+++ php-src/ext/mbstring/php_mbregex.c  Sun Feb 17 02:04:12 2008
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: php_mbregex.c,v 1.53.2.1.2.6 2007/12/31 07:20:07 sebastian Exp $ */
+/* $Id: php_mbregex.c,v 1.53.2.1.2.7 2008/02/17 02:04:12 hirokawa Exp $ */
 
 
 #ifdef HAVE_CONFIG_H
@@ -546,6 +546,13 @@
                convert_to_string_ex(arg_pattern);
                /* don't bother doing an extended regex with just a number */
        }
+
+       if (!Z_STRVAL_PP(arg_pattern) || Z_STRLEN_PP(arg_pattern) == 0) {
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "empty pattern");
+               RETVAL_FALSE;
+               goto out;
+       }
+
        re = php_mbregex_compile_pattern(Z_STRVAL_PP(arg_pattern), 
Z_STRLEN_PP(arg_pattern), options, MBSTRG(current_mbctype), 
MBSTRG(regex_default_syntax) TSRMLS_CC);
        if (re == NULL) {
                RETVAL_FALSE;

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

Reply via email to