PATCH: ctdb: buffer write beyond limits

swen swen at
Thu Feb 21 07:43:11 UTC 2019

Hi Douglas

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
> wrong.
> > the code is right if the following facts are taken into account.
> 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"
more carefully.


Cheers Swen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <>

More information about the samba-technical mailing list