[PATCH 2/2] server: Strip terminating '\0' from the registry key name. (Resend)

Alexandre Julliard julliard at winehq.org
Tue Jan 25 04:46:47 CST 2022


Dmitry Timoshkov <dmitry at baikal.ru> writes:

> @@ -477,6 +477,8 @@ static inline void get_req_path( struct unicode_str *str )
>  {
>      str->str = get_req_data();
>      str->len = (get_req_data_size() / sizeof(WCHAR)) * sizeof(WCHAR);
> +
> +    while (str->len && !str->str[str->len / sizeof(WCHAR) - 1]) str->len -= sizeof(WCHAR);

I don't see a test that would justify that while() loop. You should also
test embedded nulls.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list