[MPlayer-dev-eng] [PATCH] vstream client support
Zoltan Hidvegi
mplayer at hzoli.2y.net
Wed Feb 23 01:27:55 CET 2005
Reimar Döffinger wrote:
> > +void vstream_error(const char *format, ...) {
> > + char buf[1024];
> > + va_list va;
> > + va_start(va, format);
> > + vsnprintf(buf, 1024, format, va);
>
> This can produce a non null-terminated string. Add e.g. buf[1023] = 0;
No, vsnprintf always null-terminates. Read the manpage or the C99
standard.
Zoli
More information about the MPlayer-dev-eng
mailing list