From bb2ce9356eef5ace6b04aeacf9a78108bce7e318 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Thu, 24 Jun 2010 10:34:31 +0000 Subject: [PATCH] Check if there aren't too many variadic arguments. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64712 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/strvararg.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/common/strvararg.cpp b/src/common/strvararg.cpp index 0e1b1592af..f70593c0c5 100644 --- a/src/common/strvararg.cpp +++ b/src/common/strvararg.cpp @@ -642,6 +642,9 @@ wxFormatString::ArgumentType DoGetArgumentType(const CharType *format, wxPrintfConvSpecParser parser(format); + wxCHECK_MSG( n <= parser.nargs, wxFormatString::Arg_Unknown, + "more arguments than format string specifiers?" ); + wxCHECK_MSG( parser.pspec[n-1] != NULL, wxFormatString::Arg_Unknown, "requested argument not found - invalid format string?" ); -- 2.45.2