]> git.ipfire.org Git - thirdparty/samba.git/commit
s3:libsmb:clilist fix tautological-compare
authorGary Lockyer <gary@catalyst.net.nz>
Tue, 14 Apr 2026 22:58:15 +0000 (10:58 +1200)
committerStefan Metzmacher <metze@samba.org>
Thu, 28 May 2026 17:39:48 +0000 (17:39 +0000)
commitfae07aecfed5b3b8f53bbad4500a0ba4d8785da1
treee5a2a24c7b45bf3920ec69106fe2bb713f6c7b6b
parent2e53f7196f45d28689f25a57fa84995eceee4585
s3:libsmb:clilist 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/libsmb/clilist.c