Discussion:
[ast-developers] printf '%3$*.*s' 6 2 abc dumps core
Irek Szczesniak
2014-05-20 17:16:02 UTC
Permalink
https://www.illumos.org/issues/4860 reports the following bug in AST printf(1)

I have found several ways to core printf in ksh93. For example:

printf '%1$*2$s' 5 x

printf '%3$*.*s' 6 2 abc
Segmentation Fault (core dumped)

I had found quite a slew of others, but they may be mostly errors
around the n$ syntax handling since that is what I was testing the
most. Unfortunately, I didn't capture all of them that I've seen over
the past several days.

Irek
Dan Douglas
2014-05-23 13:18:06 UTC
Permalink
Post by Irek Szczesniak
https://www.illumos.org/issues/4860 reports the following bug in AST printf(1)
printf '%1$*2$s' 5 x
printf '%3$*.*s' 6 2 abc
Segmentation Fault (core dumped)
I've known about that one for years and just figured it was intentionally not
handled gracefully for whatever reason.

http://wiki.bash-hackers.org/commands/builtin/printf#discussion__section
(first entry)
--
Dan Douglas
Dan Douglas
2014-05-23 13:18:06 UTC
Permalink
Post by Irek Szczesniak
https://www.illumos.org/issues/4860 reports the following bug in AST printf(1)
printf '%1$*2$s' 5 x
printf '%3$*.*s' 6 2 abc
Segmentation Fault (core dumped)
I've known about that one for years and just figured it was intentionally not
handled gracefully for whatever reason.

http://wiki.bash-hackers.org/commands/builtin/printf#discussion__section
(first entry)
--
Dan Douglas
Loading...