[MPlayer-dev-eng] [PATCH] Add support for directory-wide configuration overrides V1.1

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sun Aug 30 13:35:19 CEST 2009


On Sun, Aug 30, 2009 at 02:24:18PM +0300, Christian P. Schmidt wrote:
> Reimar Döffinger wrote:
> > On Sun, Aug 30, 2009 at 12:55:15PM +0200, Reimar Döffinger wrote:
> >> On Sun, Aug 30, 2009 at 01:26:10PM +0300, Christian P. Schmidt wrote:
> >>> As for the patch itself, it's pretty straightforward. Only questionable
> >>> thing is the use of the libgen.h header for the dirname function without
> >>> checking. However this header conforms to POSIX.1-2001 (see man 3
> >>> dirname), so I don't think it's an issue.
> >> It is an issue. That header is already used elsewhere and I think that
> >> code still can not be used on all platforms MPlayer works otherwise
> >> (MinGW? Solaris? Don't remember which is the issue).
> > 
> > Ok, it is in stream/stream_dvd.c and used unconditionally, so it
> > probably doesn't really make things worse, though I remain unhappy about
> > it.
> 
> Still it's not hard to do without.

Only when you do it wrong. It won't work like that on Windows when
someone uses Windows-paths.
Though the same logic/bug is already present a few lines down.
Of course, strictly speaking dirname/basename would either not work for
that case as well or actually not be compliant...
Either way, av_strlcpy is preferable over strncpy.



More information about the MPlayer-dev-eng mailing list