From bf1dfea393b5372b6fe058458c2fc25188e8181b Mon Sep 17 00:00:00 2001 From: "Bryn M. Reeves" Date: Wed, 6 Jul 2016 16:29:06 +0100 Subject: [PATCH] libdm: check for empty aux_data in _parse_aux_data_group() If after extracting stats arguments and group tags nothing remains of aux_data but '-' set the region->aux_data field to the empty string to match behaviour for non-grouped regions. --- libdm/libdm-stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libdm/libdm-stats.c b/libdm/libdm-stats.c index 12c821f23..e979b341c 100644 --- a/libdm/libdm-stats.c +++ b/libdm/libdm-stats.c @@ -692,7 +692,7 @@ static int _parse_aux_data_group(struct dm_stats *dms, } /* separate group tag from user aux_data */ - if (strlen(end)) + if ((strlen(end) > 1) || strncmp(end, "-", 1)) c = dm_strdup(end); else c = dm_strdup("");