[MPlayer-cvslog] r32731 - in trunk: path.c path.h

KO Myung-Hun komh78 at gmail.com
Sun Jan 2 07:32:31 CET 2011


Happy New Year !!!

Reimar Döffinger wrote:
> 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
> x:something
> /something
> \something
> The last two could be fixed by prepending the current drive (or rather,
> ensuring that the base contains a drive specification and copying it
> from there).
> 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).

_fullpath() is there for those.

> Properly "absolute" paths on Windows I think would always start with
> x:/
> x:\
> \\
> // (not sure about that one actually, I suspect it might be equivalent
> to / and not to \\).

-- 
KO Myung-Hun

Using Mozilla SeaMonkey 2.0.11
Under OS/2 Warp 4 for Korean with FixPak #15
On Intel Core2Duo T5500 1.66 GHz with 2 GB RAM

Korean OS/2 User Community : http://www.ecomstation.co.kr



More information about the MPlayer-cvslog mailing list