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 #10794cute-signatures
parent
6df9f0ed59
commit
5bd3b1e3fc
|
@ -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 = strrchr(fi->name, '/');
|
||||||
uvol_name = uvol_name ? uvol_name + 1 : 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");
|
r = uvol_run(ac, "create", uvol_name, size, "ro");
|
||||||
if (r != 0) return r;
|
if (r != 0) return r;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue