[PATCH] advapi32: succeed for null pointer in ChangeServiceConfig2

Bernhard Übelacker bernhardu at vr-web.de
Thu Mar 19 12:33:31 CDT 2015

Hello Nikolay,

Am 19.03.2015 um 14:35 schrieb Nikolay Sivov:
> That's a good question. There's two ways to test it - connect to a 
> server directly from test program and see what happens on NULL 
> description (to make it work in wine you'll need to use W-call to
> a server as we do A->W conversion at client), indirectly - if you
> call ChangeServiceConfig2() with invalid handle and NULL
> description for info level 1.
> In latter case I expect it to fail on invalid handle, and because
> handle validation is supposed to be done on server side only you
> will get your answer.
I do not know if I completely understand you.
If we call ChangeServiceConfig2W with an invalid handle and would
still succeed, we can say that the check is done on client side?

But now make test fails, because the handle is needed for the RPC call?
And don't we need also on windows the handle to get to the server?

> Another thing to test is to try and set description to NULL and
> then query it back with QueryServiceConfig2W() - it's possible that
> it's actually allowed to set it to NULL and 0 error value indicates
> just that.

I tried to do some more tests:

Were that the tests you proposed?
And should the handle also be validated on client side in wine instead
of crashing, as that differs from windows too?

Kind regards,

More information about the wine-devel mailing list