Andrew,
Seems the netfilter guys found a major problem with strtoul().
Thankfully the same fix should work for us as well.
Luciano Coelho wrote:
<snip>
>
> Not easily. I found that there is a bug in strtoul (and strtoull for
> that matter) that causes the long to overflow if there are valid digits
> after the maximum possible digits for the base. For example if you try
> to strtoul 0xfffffffff (with 9 f's) the strtoul will overflow and come
> up with a bogus result. I can't easily truncate the string to avoid
> this problem, because with decimal or octal, the same valid value would
> take more spaces. I could do some magic here, checking whether it's a
> hex, dec or oct and truncate appropriately, but that would be very ugly.
>
> So the simplest way I came up with was to use strtoull and return
> -EINVAL if the value exceeds 32 bits. ;)
>
Amos
-- Please be using Current Stable Squid 2.7.STABLE9 or 3.1.6 Beta testers wanted for 3.2.0.1Received on Tue Aug 17 2010 - 07:56:05 MDT
This archive was generated by hypermail 2.2.0 : Tue Aug 17 2010 - 12:00:04 MDT