Reject wildcards in directory names

Alexandre Julliard julliard at winehq.org
Thu Nov 20 13:07:34 CST 2003


Hans Leidekker <hans at it.vu.nl> writes:

> But then the other parameter check is redundant as well:
>
>   if (!path || !*path)
>   ...
>
> Should I remove that one from CreateDirectoryA? This is done
> in other places too by the way. Should I remove those as well?

Those that are not needed yes; but make sure you really understand the
code first, in some cases the check is needed. In CreateDirectoryA I
agree it could be removed.

> As for the invalid characters, [Create|Remove]File[A|W] only check
> for '?', '*', which I just copied for [Create|Remove]Directory[A|W]. 
> I take it you will accept a patch that also extends the checks in
> [Create|Remove]File*?

Yes, and of course it should use a common routine to do the checks, so
that it's consistent everywhere. Also the Create and Remove cases
should be handled differently IMO, a Remove should succeed if the
specified file exists, even if it contains illegal characters.

-- 
Alexandre Julliard
julliard at winehq.com



More information about the wine-devel mailing list