On 10/19/23 11:45 PM, Grisha Levit wrote:
When reading a printf width/precision argument, the value isn't checked
for overflow if it happens to be the last argument:
Thanks for the report. There are a couple more things we need to do in
the case of field width or precision overflow.
Chet
--
`
When reading a printf width/precision argument, the value isn't checked
for overflow if it happens to be the last argument:
$ INT_MAX=$(getconf INT_MAX)
$ printf '[%*s]' "$((INT_MAX+1))"
[]
$ printf '[%*s]' "$((INT_MAX+1))" X
-bash: printf: X: Result too large
[]
..and the