forked from osmocom/wireshark
dfilter: Fix handling of escaped quotes in macros
We can't unescape characters when expanding a display filter macro.
The escaping must be preserved until the expression is evaluated in
the display filter engine, otherwise it will likely generate a syntax
error in the parser.
In the macro body we allow '$' (or any other char) to be escaped
with backslash (preserving the backslash).
Fixes #17160.
(cherry picked from commit 1dba58789d
)
This commit is contained in:
parent
e6eb1d7370
commit
7308ab766b
|
@ -370,8 +370,9 @@ static gboolean macro_update(void* mp, gchar** error) {
|
|||
*w = *r;
|
||||
goto done;
|
||||
case '\\':
|
||||
*(w++) = *(++r);
|
||||
r++;
|
||||
*(w++) = *(r++);
|
||||
if(*r)
|
||||
*(w++) = *(r++);
|
||||
break;
|
||||
case '$': {
|
||||
int cnt = 0;
|
||||
|
|
Loading…
Reference in New Issue