]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
tdb: Fix CID 1471761 String not null terminated
authorVolker Lendecke <vl@samba.org>
Tue, 12 Jan 2021 10:19:54 +0000 (11:19 +0100)
committerVolker Lendecke <vl@samba.org>
Thu, 14 Jan 2021 13:29:35 +0000 (13:29 +0000)
This is a false positive (in is length 3 initialized to 0), but this
patch does not hurt

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Samuel Cabrero <scabrero@samba.org>
lib/tdb/tools/tdbrestore.c

index 3312cf74d83f8c63212b49f06c7581870bf9a7cb..1435758b580155dd754655372e2b52ed27a11757 100644 (file)
@@ -89,7 +89,7 @@ static int read_data(FILE *f, TDB_DATA *d, size_t size) {
                        }
                        ok = hex_byte(in, &d->dptr[i]);
                        if (!ok) {
-                               fprintf(stderr, "Invalid hex: %s\n", in);
+                               fprintf(stderr, "Invalid hex: .2%s\n", in);
                                return -1;
                        }
                } else {