[MPlayer-dev-eng] [PATCH] stream layer support for .ifo files
Rich Felker
dalias at aerifal.cx
Tue Dec 18 19:51:35 CET 2007
On Mon, Dec 17, 2007 at 01:08:12PM +0100, Reimar Döffinger wrote:
> > if(idx>=0)
> > {
> > filename=strdup(stream->url+idx+1);
> > dvd_device=malloc(idx);
> > strncpy(dvd_device,stream->url, idx);
>
> av_strlcpy is preferred since most people make the same error in strncpy
> usage as you just did (dvd_device will not be terminated correctly).
really strncpy should be banned entirely by #defining it away in
config.h... It is always incorrect to use in modern programs.
Rich
More information about the MPlayer-dev-eng
mailing list