Package: bsdmainutils
Version: 6.1.3
Severity: normal
Tags: patch
"column -t -s," segfaults with the following input:
-------------- schnipp --------------
foo,bar
,
-------------- schnipp --------------
The attached patch solves this bug.
-- System Information:
Debian Release: testing/unstable
APT prefers testing
APT policy: (500, 'testing'), (50, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-1-amd64-k8
Locale: LANG=de_DE, LC_CTYPE=de_DE (charmap=ISO-8859-1)
Versions of packages bsdmainutils depends on:
ii bsdutils 1:2.12r-10 Basic utilities from 4.4BSD-Lite
ii debianutils 2.17 Miscellaneous utilities specific t
ii libc6 2.3.6-15 GNU C Library: Shared libraries
ii libncurses5 5.5-2 Shared libraries for terminal hand
bsdmainutils recommends no packages.
-- no debconf information
Ciao
Roland
--- column.c.org 2006-01-02 22:43:26.000000000 +0100
+++ column.c 2006-08-12 14:38:48.000000000 +0200
@@ -249,7 +249,8 @@
for (coloff = 0; coloff < t->cols - 1; ++coloff)
(void)printf("%s%*s", t->list[coloff],
lens[coloff] - t->len[coloff] + 2, " ");
- (void)printf("%s\n", t->list[coloff]);
+ if (t->list[coloff])
+ (void)printf("%s\n", t->list[coloff]);
}
}