[vlc-devel] [PATCH] demux: ts: fix debug message of non-terminated string
Rémi Denis-Courmont
remi at remlab.net
Fri Apr 29 19:39:12 CEST 2016
On Friday 29 April 2016 19:11:49 Francois Cartegnie wrote:
> Le 29/04/2016 à 18:18, Hannes Domani a écrit :
> > + char reg[5];
> > + memcpy( reg, p_dr->p_data, 4 );
> > + reg[4] = 0;
> >
> > registration_type = regs[i].reg;
> >
> > - msg_Dbg( p_demux, PMT_DESC_INDENT "%4.4s
> > registration", p_dr->p_data ); + msg_Dbg( p_demux,
> > PMT_DESC_INDENT "%4.4s registration", reg );
> Nope.
> Format string is sufficient.
The format string deals with unterminated strings correctly indeed. But the
pointer type is wrong.
--
Rémi Denis-Courmont
http://www.remlab.net/
More information about the vlc-devel
mailing list