[PATCH] kernel32: GetPrivateProfileSectionNamesA error checking (Coverity)

Paul Vriens paul.vriens.wine at gmail.com
Wed Jan 6 07:11:56 CST 2010


On 01/06/2010 01:59 PM, Marcus Meissner wrote:
> diff --git a/dlls/kernel32/tests/profile.c b/dlls/kernel32/tests/profile.c
> index e3f7156..8e64e73 100644
> --- a/dlls/kernel32/tests/profile.c
> +++ b/dlls/kernel32/tests/profile.c
> @@ -266,6 +266,10 @@ static void test_profile_sections_names(void)
>       WriteFile( h, content, sizeof(content),&count, NULL);
>       CloseHandle( h);
>
> +    ret = GetPrivateProfileSectionNames( NULL, 2, testfile3);
> +    ok (ret == 0, "NULL buf but non-0 size, expected error\n");
> +    ret = GetPrivateProfileSectionNames( buf, 29, NULL);
> +    ok (ret == 0, "NULL filename, expected error\n");
>       /* Test with sufficiently large buffer */
>       memset(buf, 0xc, sizeof(buf));
>       ret = GetPrivateProfileSectionNamesA( buf, 29, testfile3 );

Just crosscompiled for you, but winetestbot accepts patches these days ;)

-- 
Cheers,

Paul.



More information about the wine-devel mailing list