[vlc-devel] [PATCH] demux: ts: fix debug message of non-terminated string
Hannes Domani
ssbssa at yahoo.de
Sat Apr 30 12:24:36 CEST 2016
Rémi Denis-Courmont <remi at remlab.net> schrieb am 19:39 Freitag, 29.April 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.
I see, I didn't know that.
But then there is a bug in mingw-w64, because strlen() was used in this case.
More information about the vlc-devel
mailing list