diff options
author | 2023-11-24 08:58:38 +0300 | |
---|---|---|
committer | 2023-11-24 05:58:38 +0000 | |
commit | 46c8e93ddfd55b0fc7101da65ef0d4fa483d81b0 (patch) | |
tree | cf1b54aa2dc6676fa26256dd79957652fe129f08 | |
parent | build(deps): bump step-security/harden-runner from 2.6.0 to 2.6.1 (diff) | |
download | firejail-46c8e93ddfd55b0fc7101da65ef0d4fa483d81b0.tar.gz firejail-46c8e93ddfd55b0fc7101da65ef0d4fa483d81b0.tar.zst firejail-46c8e93ddfd55b0fc7101da65ef0d4fa483d81b0.zip |
Fix displaying of large file sizes. (#6086)
The most generic way is to use `intmax_t`
because we dont't know what is the "parent" type of `off_t`.
This fixes https://github.com/netblue30/firejail/issues/5982 .
-rw-r--r-- | src/firejail/ls.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/firejail/ls.c b/src/firejail/ls.c index f2ab1c188..6dc4904fc 100644 --- a/src/firejail/ls.c +++ b/src/firejail/ls.c | |||
@@ -154,7 +154,7 @@ static void print_file_or_dir(const char *path, const char *fname) { | |||
154 | 154 | ||
155 | // file size | 155 | // file size |
156 | char *sz; | 156 | char *sz; |
157 | if (asprintf(&sz, "%d", (int) s.st_size) == -1) | 157 | if (asprintf(&sz, "%jd", (intmax_t) s.st_size) == -1) |
158 | errExit("asprintf"); | 158 | errExit("asprintf"); |
159 | 159 | ||
160 | // file name | 160 | // file name |