]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libsmartcols: interpret zero width for pending data as error
authorKarel Zak <kzak@redhat.com>
Thu, 15 Feb 2018 10:58:41 +0000 (11:58 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 15 Feb 2018 10:58:41 +0000 (11:58 +0100)
commit19b10b89789943db23131db6eab40706eb915dcc
treee401ddca255f098ccd88af945f64d1a5fddaf69d
parentdd9b4cb32042def5b7767e26ebd294f7f52cd07f
libsmartcols: interpret zero width for pending data as error

The command

 $ column -t -W2 -c11 <<< "cat dog bird"

causes finite loop, because there is no minimal column width (missing
header). The print functions should be robust enough to return -EINVAL
when nonsense is requested.

Addresses: https://github.com/karelzak/util-linux/pull/577
Signed-off-by: Karel Zak <kzak@redhat.com>
libsmartcols/src/table_print.c