Merge branch 'jk/initialization-fix-to-add-submodule-odb'
[gitweb.git] / test-dump-cache-tree.c
index 54c0872fcb18edb4ca28a63fdfd4be3a17df388e..bb53c0aa655c7a2df09638024b304a79e8b07fc6 100644 (file)
@@ -47,7 +47,7 @@ static int dump_cache_tree(struct cache_tree *it,
                struct cache_tree_sub *rdwn;
 
                rdwn = cache_tree_sub(ref, down->name);
-               sprintf(path, "%s%.*s/", pfx, down->namelen, down->name);
+               xsnprintf(path, sizeof(path), "%s%.*s/", pfx, down->namelen, down->name);
                if (dump_cache_tree(down->cache_tree, rdwn->cache_tree, path))
                        errs = 1;
        }