PATCH: ctdb: buffer write beyond limits
swen at linux.ibm.com
Thu Feb 21 07:43:11 UTC 2019
Thanks for your comments.
On Thu, 2019-02-21 at 10:58 +1300, Douglas Bagnall wrote:
> Hi Swen,
> I haven't been following this thread, but your simple maths seems
> > the code is right if the following facts are taken into account.
> > 1. MAX_SIGNED_INT = MAX_UNSIGNED_INT/2 - 1
> No, not if by MAX_(UN)SIGNED_INT you mean (U)INT_MAX, which are often
> 2 ** 32 - 1 and 2 ** 31 - 1, or 4294967295 and 2147483647.
I guess I was thinking of the number of values and not the maximum
...anyway, the point I wanted to make is that it just cannot overflow,
if that's by one or by two wasn't too relevant to me at the time.
But of course you're right, should have prepared "my case"
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 833 bytes
Desc: This is a digitally signed message part
More information about the samba-technical