[PATCH] kernel32: GetPrivateProfileSectionNamesA error checking (Coverity)

Alexandre Julliard julliard at winehq.org
Wed Jan 6 09:21:57 CST 2010

Dan Kegel <dank at kegel.com> writes:

> AJ wrote:
>> Marcus Meissner <marcus at jet.franken.de> writes:
>>> buffer and size need to be either 0 at the same time or not,
>>> otherwise this breaks up. Windows is inconsistent (either crashes
>>> or returns invalids), so we can just add checking.
>>If Windows crashes we don't need extra checks. Just tell Coverity that
>>crashing is allowed here.
> If later versions of Windows return INVALID_PARAMETER,
> wouldn't it be ok for Wine to do so rather than crashing?
> In other words, isn't it ok to emulate the 'best' behaved
> version of windows in cases like this, rather than the 'worst'?

Crashing is the best behavior. Adding parameter checks all over the
place only hides bugs.

Alexandre Julliard
julliard at winehq.org

More information about the wine-devel mailing list