From 1b7cf216d933b395dee691f05becca4dd44b26f7 Mon Sep 17 00:00:00 2001 From: "Heiko Schlittermann (HS12-RIPE)" Date: Wed, 4 Oct 2017 22:25:45 +0200 Subject: Check for proper output separator in expanding ${addresses:STRING} (Closes 2171) Better yet would be to force setting the output separator literally, and not after expansion of the STRING. But this would be an incompatible change. --- src/src/expand.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/src/expand.c b/src/src/expand.c index 353b8ea56..67b3d65de 100644 --- a/src/src/expand.c +++ b/src/src/expand.c @@ -6797,7 +6797,13 @@ while (*s != 0) int start, end, domain; /* Not really used */ while (isspace(*sub)) sub++; - if (*sub == '>') { *outsep = *++sub; ++sub; } + if (*sub == '>') + if (*outsep = *++sub) ++sub; + else { + expand_string_message = string_sprintf("output separator " + "missing in expanding ${addresses:%s}", --sub); + goto EXPAND_FAILED; + } parse_allow_group = TRUE; for (;;) -- cgit v1.2.3