[PATCH 1/2] setupapi/tests: Add a test for SetupGetStringField with strings with embedded \0.

Dmitry Timoshkov dmitry at baikal.ru
Fri Sep 11 06:16:05 CDT 2020


Alexandre Julliard <julliard at winehq.org> wrote:

> >> >  dlls/setupapi/tests/parser.c | 69 +++++++++++++++++++++++++++++++-----
> >> >  1 file changed, 60 insertions(+), 9 deletions(-)
> >> 
> >> Please update the existing parser tests instead.
> >
> > Unfortunately existing tests depend on test data being NUL terminated,
> > and even the test that presumably is supposed to test embedded NUL
> > (test_key_names() with "abcd=ef\x0gh") fails to do so because of strcpy/
> > strcat used to create test file contents. That's why I decided to go
> > a simpler way and just create new test from scratch.
> 
> Yes, that test is currently broken. It would be better to fix it and
> then extend it, than to leave it broken and create a whole new function
> just for this.

Since I'm interested to see the patch with the fix accepted, then if there's
nothing wrong with the fix I'd appreciate if it could be commited. Then I'd
take a look at the fixing the tests and adding some new ones a bit later.

-- 
Dmitry.



More information about the wine-devel mailing list