On Thursday, August 26, 2010 16:19:45 Mike Frysinger wrote:
> On Thursday, August 26, 2010 06:20:43 Frans Meulenbroeks wrote:
> > @@ -143,11 +143,12 @@ COMMENT (!.*)|("//".*)[^\n]
> >
> > This is enabled with <expect_vector>. */
> >
> > /* token is a vector string */
> > char *cstring;
> >
> > + int len;
> >
> > fix_yylloc_nl(yylloc, yytext, yyget_extra(yyscanner));
> >
> > - align_string(yytext);
> > + len = align_string(yytext);
> >
> > - cstring = malloc(strlen(yytext) + 1);
> > + cstring = malloc(len + 1);
> >
> > strcpy(cstring, yytext);
> > yylval->cvalue = cstring;
>
> we know the length, so let's change strcpy() to memcpy() while we're here
> (and in the other places too)i merged your original change and then made the strcpy->memcpy fix myself -mike
signature.asc
Description: This is a digitally signed message part.
------------------------------------------------------------------------------ This SF.net Dev2Dev email is sponsored by: Show off your parallel programming skills. Enter the Intel(R) Threading Challenge 2010. http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________ UrJTAG-development mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/urjtag-development
