]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
gencache: Remove a redundant check
authorVolker Lendecke <vl@samba.org>
Tue, 9 Oct 2018 19:41:52 +0000 (21:41 +0200)
committerJeremy Allison <jra@samba.org>
Wed, 17 Oct 2018 20:22:51 +0000 (22:22 +0200)
tdb_storev itself is robust against overflow due to multiple buffers

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Oct 17 22:22:51 CEST 2018 on sn-devel-144

source3/lib/gencache.c

index 528414bd66e019185ea3dd746552c67b8a6a62a6..6f7734c200404ac37ec145e72896c1e0aac3fdff 100644 (file)
@@ -301,9 +301,6 @@ bool gencache_set_data_blob(const char *keystr, DATA_BLOB blob,
        if (hdr_len == -1) {
                return false;
        }
-       if ((blob.length + (size_t)hdr_len) < blob.length) {
-               return false;
-       }
 
        dbufs[0] = (TDB_DATA) { .dptr = (uint8_t *)hdr, .dsize = hdr_len };
        dbufs[1] = (TDB_DATA) { .dptr = blob.data, .dsize = blob.length };