[MPlayer-cvslog] r32731 - in trunk: path.c path.h
Reimar.Doeffinger at gmx.de
Thu Dec 30 13:23:41 CET 2010
On Tue, Dec 28, 2010 at 10:19:38PM +0100, Clément Bœsch wrote:
> What do you think of this patch? Also, I'm not sure it solve the
> "security" issue mentionned by Reimar since I didn't figure out a real
> case example.
It should probably not make a difference for this use case.
> - * @brief Indicates weither the path is absolute or not.
> + * @brief Join two paths if new path is not absolute.
Huh? What does "new path" mean here?
> + * @param base File or directory base path.
> + * @param path Path to concatenate with the base.
> + * @return New allocated string with the path, or NULL in case of error.
> + * @warning Do not forget the trailing path separator at the end of the base
> + * path if it is a directory: since file paths are also supported,
> + * this separator will make the distinction.
Add a note that the resulting path will still depend on the current dir
for Windows paths of the form
The last two could be fixed by prepending the current drive (or rather,
ensuring that the base contains a drive specification and copying it
The first one is not generally fixable, but by the descriptions I read
that kind of path should probably never appear inside this code (in
which case you could add an assert).
Properly "absolute" paths on Windows I think would always start with
// (not sure about that one actually, I suspect it might be equivalent
to / and not to \\).
More information about the MPlayer-cvslog