]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: nmbd: Fix strict overflow checking compiler warning.
authorStefan Metzmacher <metze@samba.org>
Thu, 5 Apr 2018 20:28:12 +0000 (13:28 -0700)
committerJeremy Allison <jra@samba.org>
Thu, 5 Apr 2018 21:05:39 +0000 (23:05 +0200)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/nmbd/nmbd_incomingrequests.c

index 6f3eee368909666de8bd6ab0d46497a65b64a1a0..96cb124959989607c11f428f7a893e5ff31c533e 100644 (file)
@@ -341,7 +341,7 @@ subnet %s - name not found.\n", nmb_namestr(&nmb->question.question_name),
 
        namerec = subrec->namelist;
 
-       while (buf < bufend) {
+       while (PTR_DIFF(bufend, buf) > 0) {
                if( (namerec->data.source == SELF_NAME) || (namerec->data.source == PERMANENT_NAME) ) {
                        int name_type = namerec->name.name_type;
                        unstring name;