[MPlayer-dev-eng] [PATCH 2/4] String handling audit/cleanup take 2
Reimar Döffinger
Reimar.Doeffinger at stud.uni-karlsruhe.de
Thu Mar 8 10:21:48 CET 2007
Hello,
On Wed, Mar 07, 2007 at 05:41:10AM -0500, Nicholas Kain wrote:
> On 3/6/07, Reimar Döffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de> wrote:
> >> @@ -690,8 +690,7 @@ static int asf_http_parse_response(asf_h
> >>
> >mp_msg(MSGT_NETWORK,MSGL_WARN,MSGTR_MPDEMUX_ASF_ASFHTTPParseWarnCuttedPragma,pragma,len,sizeof(features) - 1);
> >> len = sizeof(features) - 1;
> >> }
> >> - strncpy( features, pragma, len );
> >> - features[len]='\0';
> >> + strlcpy( features, pragma, len );
> >
> >wrong.
>
> 'wrong' is not a very good response for this case. This is an instance
> where strncpy() should never have been used.
It is because it is not equivalent to the current code.
More information about the MPlayer-dev-eng
mailing list