]> git.ipfire.org Git - thirdparty/samba.git/commit
s3:utils:clirap2 fix tautological-compare
authorGary Lockyer <gary@catalyst.net.nz>
Wed, 15 Apr 2026 00:35:24 +0000 (12:35 +1200)
committerStefan Metzmacher <metze@samba.org>
Thu, 28 May 2026 17:39:48 +0000 (17:39 +0000)
commit3287641bbf3360c8241db090781ebc2d5febbc96
tree10d7f8cef2bcdaf29f7acac6ba801fc8a2eec1ab
parent769cf0a0ddb5c7af65afa5b764c24a3416025745
s3:utils:clirap2 fix tautological-compare

The wrapping of pointer arithmetic is undefined behaviour. Clang from version 20
onwards will treat an overflow check of the following form:
   ptr + offset < ptr
as always evaluating to false

BUG: https://bugzilla.samba.org/show_bug.cgi?id=16092

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
source3/utils/clirap2.c