From bd9d2d6ff967811a7278191786a1a66298c1c9de Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Tue, 11 Jul 2023 16:15:53 -0400 Subject: [PATCH] MT#55283 add extra string escaping mechanism Allow spaces to be escaped as double periods. Change-Id: If7d9322444ad329a877cd844618ba4c1fbe4a356 --- daemon/call_interfaces.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/daemon/call_interfaces.c b/daemon/call_interfaces.c index d4ae04763..328c4d8ac 100644 --- a/daemon/call_interfaces.c +++ b/daemon/call_interfaces.c @@ -879,6 +879,11 @@ static str *str_dup_escape(const str *s) { memmove(&ret->s[i + 1], &ret->s[i + 2], ret->len - i - 2); ret->len--; } + while ((i = str_str(ret, "..")) >= 0) { + ret->s[i] = ' '; + memmove(&ret->s[i + 1], &ret->s[i + 2], ret->len - i - 2); + ret->len--; + } return ret; } static void call_ng_flags_esc_str_list(struct sdp_ng_flags *out, str *s, void *qp) {