From 975ed32fd93503aa109e231ec26a582cb0398dd8 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 12 Sep 2016 11:58:34 +0200 Subject: [PATCH] libsmartcols: fix WRAPNL crashes Addresses: https://github.com/karelzak/util-linux/issues/344 Signed-off-by: Karel Zak --- libsmartcols/src/table_print.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);