On 12/01/2012 02:47 AM, Chet Ramey wrote:
On 11/29/12 5:07 AM, Roman Rakus wrote:
see
https://www.securecoding.cert.org/confluence/display/seccode/INT32-C.+Ensure+that+operations+on+signed+integers+do+not+result+in+overflow
I've actually read this.
I'm skeptical that this change has any practical effect at all. I'd like
to see a case where the use of ints in this struct causes overflow, even
on a 32-bit machine.
Chet
Hi chet,
you're right, it has no practical effect - rather esthetical. If I'm
calculating it well the case should contain more than 536870912
variables (2^32/8).
I have no access to 32-bit machine right now, but I can try to run
following script:
for ((i=0; i<$((2**32/8 +1)); i++))
do
eval "a$i=a$i"
done
RR