[Bro-Dev] [Bro-Commits] [git/bro] fastpath: parse 64-bit consts correctly. (03f5795)

Bernhard Amann bernhard at ICSI.Berkeley.EDU
Tue Aug 28 20:28:03 PDT 2012


Argh. Yes, I am stupid, it was supposed to be stroull, not strtoll……. bad me.

On Aug 28, 2012, at 6:19 PM, Seth Hall <seth at icir.org> wrote:

> 
> On Aug 28, 2012, at 10:33 AM, Bernhard Amann <bernhard at ICSI.Berkeley.EDU> wrote:
> 
>> 		// TODO: check if we can use strtoull instead of atol,
>> 		// and similarly for {HEX}.
>> -		RET_CONST(new Val(static_cast<unsigned int>(atol(yytext)),
>> +		RET_CONST(new Val(static_cast<bro_uint_t>(strtoll(yytext, (char**) NULL, 10)),
>> 			  TYPE_COUNT))
> 
> I still don't think this is right since we can't type in a full 64bit uint with this, right?
> 
> Also, we should probably remove that comment now that it won't apply anymore.
> 
>  .Seth
> 
> --
> Seth Hall
> International Computer Science Institute
> (Bro) because everyone has a network
> http://www.bro-ids.org/
> 
> 
> _______________________________________________
> bro-dev mailing list
> bro-dev at bro-ids.org
> http://mailman.icsi.berkeley.edu/mailman/listinfo/bro-dev




More information about the bro-dev mailing list