diff options
author | Karel Zak | 2017-03-02 14:04:47 +0100 |
---|---|---|
committer | Karel Zak | 2017-05-02 12:17:59 +0200 |
commit | 3cc2ade8264e9e0533e9683792fa1b67a9de5082 (patch) | |
tree | b9d76ee73b87303c33f572539ed2f264f2e2ac00 /text-utils/column.c | |
parent | tests: add column/files directory (diff) | |
download | kernel-qcow2-util-linux-3cc2ade8264e9e0533e9683792fa1b67a9de5082.tar.gz kernel-qcow2-util-linux-3cc2ade8264e9e0533e9683792fa1b67a9de5082.tar.xz kernel-qcow2-util-linux-3cc2ade8264e9e0533e9683792fa1b67a9de5082.zip |
column: don't ignore mbs_to_wcs() errors
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'text-utils/column.c')
-rw-r--r-- | text-utils/column.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/text-utils/column.c b/text-utils/column.c index 51a5b8efd..d91236959 100644 --- a/text-utils/column.c +++ b/text-utils/column.c @@ -444,6 +444,8 @@ static int input(struct column_control *ctl, FILE *fp) maxents * sizeof(wchar_t *)); } ctl->ents[ctl->nents] = mbs_to_wcs(str); + if (!ctl->ents[ctl->nents]) + err(EXIT_FAILURE, _("read failed")); len = width(ctl->ents[ctl->nents]); if (ctl->maxlength < len) ctl->maxlength = len; |