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

Dmitry Timoshkov dmitry at baikal.ru
Fri Sep 11 02:22:04 CDT 2020


Alexandre Julliard <julliard at winehq.org> wrote:

> Dmitry Timoshkov <dmitry at baikal.ru> writes:
> 
> > Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
> > ---
> >  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.

> And if null chars need
> special handling this would need to be done as part of the parser state
> machine.

Thanks.

-- 
Dmitry.



More information about the wine-devel mailing list