[MPlayer-dev-eng] Re: [PATCH] minor tweak to title range parsing

Rich Felker dalias at aerifal.cx
Fri Apr 7 21:10:43 CEST 2006


On Fri, Apr 07, 2006 at 01:27:37PM -0400, Robert Henney wrote:
> -                  snprintf(entbuf,9,"dvd://%d",j);
> +		  entbuf[sizeof entbuf - 1] = '\0';
> +                  snprintf(entbuf,sizeof entbuf - 1,"dvd://%d",j);

This part nonsense. snprintf always null-terminates. Use:
snprintf(entbuf,sizeof entbuf,"dvd://%d",j);

Rich




More information about the MPlayer-dev-eng mailing list