[PATCH] lib/util/idtree.c: fix undefined behaviour by using uint in left-shift

Aurélien Aptel aaptel at suse.com
Thu Feb 25 15:43:39 UTC 2016

Using negative values (~0 with no suffix is signed and == -1) on the
left-side of a left-shift operation is an Undefined Behaviour in C.

Please review&push


Aurélien Aptel / SUSE Labs Samba Team
GPG: 1839 CB5F 9F5B FB9B AA97  8C99 03C8 A49B 521B D5D3
SUSE Linux GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-lib-util-idtree.c-fix-UB-by-using-uint-in-left-shift.patch
Type: text/x-patch
Size: 878 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20160225/e1d22a15/0003-lib-util-idtree.c-fix-UB-by-using-uint-in-left-shift.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20160225/e1d22a15/attachment.sig>

More information about the samba-technical mailing list