Re: Security concern about open range integers (was: Question about: 4.1.1 Integer representation)

On 21 October 2013 15:55, Fred Akalin <akalin@google.com> wrote:
> although doing it via masks seems too tricky.

That's the great thing with our specifications.  You can do it however you want.

Personally, I wouldn't ever want to go anywhere near 2^32 or even 2^31
for header field name or value lengths.  So my overflow detection
would be far cruder even than that.  I'd accumulate to a 32-bit value
and blow up if the n-th byte (maybe the 4th) had the first bit set.
No risk that way.

Greater risks come to those who want to sail closer to the reef, of course.

Received on Monday, 21 October 2013 23:09:27 UTC