[PATCH 1/2] server: Terminating '\' in the registry root name is optional.

Dmitry Timoshkov dmitry at baikal.ru
Tue Dec 7 00:19:36 CST 2021


Alexandre Julliard <julliard at winehq.org> wrote:

> > @@ -483,6 +483,11 @@ static inline void get_req_path( struct unicode_str *str, int skip_root )
> >      {
> >          str->str += ARRAY_SIZE( root_name );
> >          str->len -= sizeof(root_name);
> > +        if (str->str[0] == '\\')
> > +        {
> > +            str->str++;
> > +            str->len -= sizeof(WCHAR);
> > +        }
> 
> You need to check the length first, and you need to reject anything that
> isn't a backslash at that point.

Thanks, I'll resend with the length check.

> I feel that using the normal path handling also for the first component,
> possibly creating a root key of that name, would be a better approach.

I'll leave investigating that solution as a later opportunity.

-- 
Dmitry.



More information about the wine-devel mailing list