Wireshark-dev: Re: [Wireshark-dev] Fix signed overflow
From: Kevin Cox <[email protected]>
Date: Thu, 11 Feb 2016 10:41:13 -0500
On Wed, 2016-02-10 at 10:46 -0500, Michael McConville wrote:
Signed overflow is undefined, so the overflow check below is technically
meaningless. Because we're only checking whether an increment will
overflow, we can compare j to G_MAXINT instead.

This is an important fix. The compiler is allowed to (and often will) just omit that checking code and replace with with a false because it can never evaluate to true using only defined behaviour. That check is effectively useless as currently written.

Attachment: signature.asc
Description: This is a digitally signed message part

Attachment: smime.p7s
Description: S/MIME cryptographic signature