From 5bd3b1e3fc407f1ec558ebf4dfc147842191f893 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Tue, 14 Dec 2021 10:55:27 -0600 Subject: [PATCH] uvol: cast size data to intmax_t this ensures the %ju format parameter is always passed an integer that is appropriately sized, e.g. on mac where off_t is normally 32-bit. ref #10794 --- src/fs_uvol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fs_uvol.c b/src/fs_uvol.c index f2ba3f1..ec6fc35 100644 --- a/src/fs_uvol.c +++ b/src/fs_uvol.c @@ -110,7 +110,7 @@ static int uvol_file_extract(struct apk_ctx *ac, const struct apk_file_info *fi, uvol_name = strrchr(fi->name, '/'); uvol_name = uvol_name ? uvol_name + 1 : fi->name; - snprintf(size, sizeof size, "%ju", fi->size); + snprintf(size, sizeof size, "%ju", (intmax_t) fi->size); r = uvol_run(ac, "create", uvol_name, size, "ro"); if (r != 0) return r;