From: Piotr Caban Subject: Re: [PATCH v2] msvcrt: Don't crash if _vsnwprintf gets NULL as format string and add test Message-Id: Date: Wed, 22 Nov 2017 17:21:34 +0100 In-Reply-To: <20171118190414.11520-1-dark.shadow4@web.de> References: <20171118190414.11520-1-dark.shadow4@web.de> On 11/18/17 20:04, Fabian Maurer wrote: > + if(!fmt) > + return -1; Newer versions of the dll are also setting errno and calling invalid parameter handler. > +static BOOL is_vista_or_newer(void) > +{ > + OSVERSIONINFOA version; > + version.dwOSVersionInfoSize = sizeof(version); > + GetVersionExA(&version); > + return version.dwMajorVersion > 5; > +} Please test dll functionality instead of checking system version. You can e.g. check for function existence that was added in newer version. Thanks, Piotr