[MPlayer-dev-eng] [PATCH 2/4] String handling audit/cleanup
Nico Sabbi
nicola_sabbi at fastwebnet.it
Sat Mar 3 14:52:12 CET 2007
Nico Sabbi wrote:
> committed your patch to stream_dvb and part of the ones to stream_dvd.c,
> except that
> 1) len= strlen(dvd_device) was 1 byte too short
> 2)
> @@ -868,7 +869,7 @@ static int open_s(stream_t *stream,int m
> int i;
> char buf[33];
> for (i = 0; i < 16; i ++)
> - sprintf(buf+2*i, "%02X", discid[i]);
> + snprintf(buf+2*i, sizeof buf - ((buf+2*i)-buf), "%02X",
> discid[i]);
> mp_msg(MSGT_IDENTIFY, MSGL_V, "ID_DVD_DISC_ID=%s\n", buf);
> }
> }
>
> looks too horrendous to read (not that stream_dvd.c looks nice overall,
> very old-team style)
>
btw, Reimar complained of the change sprintf() -> snprintf().
I'll eventually reverse my commits if enough developers ask me to; I'm
quite neutral on the subject of these commits
--
"Without a frontend, mplayer is useless" - someone in mplayer-users
More information about the MPlayer-dev-eng
mailing list