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

Alexandre Julliard julliard at winehq.org
Fri Sep 11 06:08:01 CDT 2020


Dmitry Timoshkov <dmitry at baikal.ru> writes:

> 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.

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.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list