From af502fade13652009e3cf523672ab5e320520042 Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Sat, 13 Aug 2016 10:29:15 +1000 Subject: [PATCH] ctdb-tools: Fix CID 1125618 String not null terminated (STRING_NULL) BUG: https://bugzilla.samba.org/show_bug.cgi?id=12157 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- ctdb/tools/ctdb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ctdb/tools/ctdb.c b/ctdb/tools/ctdb.c index a2aacfff3a5..7acf8ea7cd0 100644 --- a/ctdb/tools/ctdb.c +++ b/ctdb/tools/ctdb.c @@ -4182,6 +4182,7 @@ static int control_restoredb(TALLOC_CTX *mem_ctx, struct ctdb_context *ctdb, argv[0]); return ret; } + db_hdr.name[sizeof(db_hdr.name)-1] = '\0'; if (db_hdr.version != DB_VERSION) { fprintf(stderr,