aboutsummaryrefslogtreecommitdiff
path: root/toys/other
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2019-08-03 21:36:06 -0500
committerRob Landley <rob@landley.net>2019-08-03 21:36:06 -0500
commite5942a8c90c2f52550496fdf08efddb564d8e5a3 (patch)
tree7ad59a94a17284c6553bfcc4e133993c18211aae /toys/other
parent8920cc66aedbc46f3d74c91038328febc84c4203 (diff)
downloadtoybox-e5942a8c90c2f52550496fdf08efddb564d8e5a3.tar.gz
Fix a bug report from E5ten: stat of a file with suid or sticky bit set
output 5 digits of octal stat data instead of 4, due to hardwired leading 0 instead of %04a sprintf prefix.
Diffstat (limited to 'toys/other')
-rw-r--r--toys/other/stat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/other/stat.c b/toys/other/stat.c
index 66c5dc3b..d99331b7 100644
--- a/toys/other/stat.c
+++ b/toys/other/stat.c
@@ -193,7 +193,7 @@ void stat_main(void)
"Inodes: Total: %c\tFree: %d"
: " File: %N\n Size: %s\t Blocks: %b\t IO Blocks: %B\t %F\n"
"Device: %Dh/%dd\t Inode: %i\t Links: %h\t Device type: %t,%T\n"
- "Access: (0%a/%A)\tUid: (%5u/%8U)\tGid: (%5g/%8G)\n"
+ "Access: (%04a/%A)\tUid: (%5u/%8U)\tGid: (%5g/%8G)\n"
"Access: %x\nModify: %y\nChange: %z";
if (FLAG(c)) format = TT.c;