]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
column: fix leading space characters bug stable/v2.30
authorKarel Zak <kzak@redhat.com>
Tue, 27 Mar 2018 08:40:13 +0000 (10:40 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 27 Mar 2018 09:34:11 +0000 (11:34 +0200)
The bug has been introduced during column(1) rewrite. The function
read_input() need to skip leading space only temporary to detect empty
lines, but the rest of the code has to use the original buffer (line).

Addresses: https://github.com/karelzak/util-linux/issues/575
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1560283
Signed-off-by: Karel Zak <kzak@redhat.com>
text-utils/column.c

index 5eb0de1ae7202433adaf3fcc440b894a91db660d..d6a6385e336e0b3e803550372597f4c9ae5ac12f 100644 (file)
@@ -452,7 +452,7 @@ static int read_input(struct column_control *ctl, FILE *fp)
                if (!str || !*str)
                        continue;
 
-               wcs = mbs_to_wcs(str);
+               wcs = mbs_to_wcs(buf);
                if (!wcs)
                        err(EXIT_FAILURE, _("read failed"));