helly Tue Mar 6 01:21:36 2007 UTC
Modified files:
/php-src/ext/mbstring/oniguruma regerror.c
Log:
- Add missing return value check
http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/oniguruma/regerror.c?r1=1.3&r2=1.4&diff_format=u
Index: php-src/ext/mbstring/oniguruma/regerror.c
diff -u php-src/ext/mbstring/oniguruma/regerror.c:1.3
php-src/ext/mbstring/oniguruma/regerror.c:1.4
--- php-src/ext/mbstring/oniguruma/regerror.c:1.3 Sun Feb 20 22:18:08 2005
+++ php-src/ext/mbstring/oniguruma/regerror.c Tue Mar 6 01:21:36 2007
@@ -276,6 +276,9 @@
va_init_list(args, fmt);
n = vsnprintf(buf, bufsize, fmt, args);
+ if (n < 0 || n >= bufsize) {
+ n = bufsize - 1;
+ }
va_end(args);
need = (pat_end - pat) * 4 + 4;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php