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) -mike
signature.asc
Description: This is a digitally signed message part.
------------------------------------------------------------------------------ Sell apps to millions through the Intel(R) Atom(Tm) Developer Program Be part of this innovative community and reach millions of netbook users worldwide. Take advantage of special opportunities to increase revenue and speed time-to-market. Join now, and jumpstart your future. http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________ UrJTAG-development mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/urjtag-development
