From a9c4107ee4d207d99f337283c0ac4e178192984f Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Wed, 28 Feb 2007 01:01:01 +0000 Subject: [PATCH] Adjust vsnprintf() usage --- ext/mbstring/oniguruma/regerror.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/mbstring/oniguruma/regerror.c b/ext/mbstring/oniguruma/regerror.c index 134cf25c6b..0ef63be091 100644 --- a/ext/mbstring/oniguruma/regerror.c +++ b/ext/mbstring/oniguruma/regerror.c @@ -1,4 +1,4 @@ -/********************************************************************** + regerror.c - Oniguruma (regular expression library) **********************************************************************/ /*- @@ -279,7 +279,7 @@ onig_snprintf_with_pattern(buf, bufsize, enc, pat, pat_end, fmt, va_alist) va_init_list(args, fmt); n = vsnprintf((char* )buf, bufsize, (const char* )fmt, args); if (n >= bufsize) { - return; + n = bufsize - 1; } va_end(args); -- 2.50.1