summaryrefslogtreecommitdiffstats
path: root/libsmartcols
diff options
context:
space:
mode:
authorKarel Zak2016-09-12 11:58:34 +0200
committerKarel Zak2016-09-12 11:58:34 +0200
commit975ed32fd93503aa109e231ec26a582cb0398dd8 (patch)
treea99d1395048be1646af9ba70ff55452af239c035 /libsmartcols
parentmount: add note about another flags for "remount,bind" (diff)
downloadkernel-qcow2-util-linux-975ed32fd93503aa109e231ec26a582cb0398dd8.tar.gz
kernel-qcow2-util-linux-975ed32fd93503aa109e231ec26a582cb0398dd8.tar.xz
kernel-qcow2-util-linux-975ed32fd93503aa109e231ec26a582cb0398dd8.zip
libsmartcols: fix WRAPNL crashes
Addresses: https://github.com/karelzak/util-linux/issues/344 Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libsmartcols')
-rw-r--r--libsmartcols/src/table_print.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libsmartcols/src/table_print.c b/libsmartcols/src/table_print.c
index bdac0b296..7355fe8e1 100644
--- a/libsmartcols/src/table_print.c
+++ b/libsmartcols/src/table_print.c
@@ -333,7 +333,7 @@ static int set_pending_data(struct libscols_column *cl, const char *data, size_t
{
char *p = NULL;
- if (data) {
+ if (data && *data) {
DBG(COL, ul_debugobj(cl, "setting pending data"));
assert(sz);
p = strdup(data);