]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb: Fix format in db_hash_test
authorAndreas Schneider <asn@samba.org>
Mon, 29 Apr 2019 11:26:04 +0000 (13:26 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Tue, 7 May 2019 17:31:23 +0000 (17:31 +0000)
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 <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
ctdb/tests/src/db_hash_test.c

index 1f93743e0007ceff67faa8af6f8b290d71e62efa..31aa50116533321f72343bddfef29336884ce0fc 100644 (file)
@@ -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;