[PATCH] advapi32: succeed for null pointer in ChangeServiceConfig2

Stefan Dösinger stefandoesinger at gmail.com
Fri Mar 20 06:17:42 CDT 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Good work debugging this. My knowledge about advapi32 is limited, but I
have a comment about the test:

Am 2015-03-19 um 13:06 schrieb Bernhard Übelacker:
> +    pConfig->lpDescription = NULL;
> +    ret = pChangeServiceConfig2A(svc_handle, SERVICE_CONFIG_DESCRIPTION,buffer);
> +    ok(ret, "ChangeServiceConfig2A failed with null pointer\n");
> +    if (!ret) {
> +        goto cleanup;
> +    }
Adding the test like this may work, but I don't think it is the right
way. This call may overwrite settings set by the previous
ChangeServiceConfig2A call if it succeeds. If it fails (and doesn't
crash) the test can continue just fine since the previous call set up
the configuration.

I think it would be better to move this into its own test.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBAgAGBQJVDAHWAAoJEN0/YqbEcdMwNOgP/irtATTOHllTYLRxVI13UiNi
muUvj+pkXYLHzmx6Fzrp90nlu6SCE5yqk4JkE+sHJO3xReQ0r5b7hnAKmgiAEsqk
cVLjBXbyrP+gciLPfSJiYUHTwbfFOiEfKhcpcS4llGj2iHpU3XgEkvvTVrxzTfBz
lAyp1shmD4zBLq9urW2/zc5YsXtzVOIRSKW2X+S8nyem+pikRi15F7Dm07hftquw
Xv/krwZw/36/FKP6gkMk+5594OHmjHiknn+cQFkTZdLXiTdtSqzVWigTfn7IR4rT
0Y0eCeDQI16mcitAVnYgmaaOodIe/J8KmleBJb13VEQxQOIhPyU5ujHys6avoJks
JeD/n2NUhzHtNqwxdiGLMnZJXPK3Jt9wSMF6EQu2hY0XURYwwPVEeWegjo/PfdO/
9fwSRlTfBLVnYIM66fFbntR7M8S/aaYnXdRWNF49GRRgRLb7HMMC27yBnoGif1dC
nhaFWS98jM4kByDSf3ib/OPqIdjPc9K/j6X2ilp/Tjx8ybiXxpB/GFojmyaP0j7p
fZ4BH4edz85IrzS9Usq53ugpP1lViDeUWcoZrF6wBUrXgiP/EzqV+SNJTesDbFzX
DjkhwhuQxsnmKS5hLQkX24uCmY0trs1CFm3eoN+eg2+tXVknLfrQ2M88AblPPxbS
Wg5PW20xgEIZ1dbXShSZ
=lLfe
-----END PGP SIGNATURE-----



More information about the wine-devel mailing list