libsmartcols: fix WRAPNL crashes

Addresses: https://github.com/karelzak/util-linux/issues/344
Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2016-09-12 11:58:34 +02:00
parent fa17791720
commit 975ed32fd9
1 changed files with 1 additions and 1 deletions

View File

@ -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);