]> git.ipfire.org Git - thirdparty/util-linux.git/commit
lsblk: check number of used columns
authorKarel Zak <kzak@redhat.com>
Thu, 17 Jul 2014 15:17:46 +0000 (17:17 +0200)
committerKarel Zak <kzak@redhat.com>
Fri, 18 Jul 2014 11:47:53 +0000 (13:47 +0200)
commitb6327c6fd835018406f29321278e0d5fffd92251
tree7b45e52a83961ffa051706dde15a0a5445192d7c
parent03df0d1150d5b8512397ca299edbe10810bb7fbf
lsblk: check number of used columns

The current code does not check size of the columns[] array when add
the next on command line specified column. We check the array size for
"-o <columns>" but not for another options.

Old version:

   $ for x in $(seq 0 100); do echo "-t"; done | xargs lsblk
   xargs: lsblk: terminated by signal 11

new version:

  $ for x in $(seq 0 100); do echo "-t"; done | xargs lsblk
  lsblk: too many columns specified, the limit is 83 columns.

Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/lsblk.c