|
From: | Roman Rakus |
Subject: | Re: [PATCH] Use size_t for variable list size and length |
Date: | Sun, 02 Dec 2012 16:53:30 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120605 Thunderbird/13.0 |
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+overflowI'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
[Prev in Thread] | Current Thread | [Next in Thread] |