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.
This commit is contained in:
parent
8d60d8c4f2
commit
1dba58789d
|
@ -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