Fix crash when sprintf width argument overflows u64

Given "printf %18446744073709551616s", we parse the number only in
the printf crate, which tells us that we overflowed somwhere (but
not where exactly).
This commit is contained in:
Johannes Altmanninger
2024-11-09 07:54:55 +01:00
parent 9fddc3e887
commit 2543b8198d
2 changed files with 11 additions and 1 deletions

View File

@@ -151,3 +151,6 @@ echo
# This is how mc likes to encode the directory we should cd to.
printf '%b\n' '\0057foo\0057bar\0057'
# CHECK: /foo/bar/
printf %18446744073709551616s
# CHECKERR: Number out of range