From: Andreas Schneider Date: Mon, 29 Apr 2019 11:26:04 +0000 (+0200) Subject: ctdb: Fix format in db_hash_test X-Git-Tag: tdb-1.4.1~167 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d16e9dfc81d7d79c8d2bcffc66b6fe008e726974;p=thirdparty%2Fsamba.git ctdb: Fix format in db_hash_test error: ā€˜%04d’ directive writing between 4 and 11 bytes into a region of size 5 [-Werror=format-overflow=] sprintf(key, "key%04d", i); Signed-off-by: Andreas Schneider Reviewed-by: Ralph Boehme --- diff --git a/ctdb/tests/src/db_hash_test.c b/ctdb/tests/src/db_hash_test.c index 1f93743e000..31aa5011653 100644 --- a/ctdb/tests/src/db_hash_test.c +++ b/ctdb/tests/src/db_hash_test.c @@ -99,7 +99,7 @@ static void do_traverse_test(enum db_hash_type type) { struct db_hash_context *dh = NULL; TALLOC_CTX *mem_ctx = talloc_new(NULL); - char key[] = "keyXXXX"; + char key[16] = "keyXXXX"; char value[] = "This is some test value"; int count, ret, i;