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:
parent
fa17791720
commit
975ed32fd9
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue