diff options
author | João Valverde <j@v6e.pt> | 2021-09-27 10:33:42 +0100 |
---|---|---|
committer | Wireshark GitLab Utility <gerald+gitlab-utility@wireshark.org> | 2021-10-08 04:01:24 +0000 |
commit | 92285e62588191b6a0be953b756fae4788d24d19 (patch) | |
tree | 3a7759c40f8cb1fe936cdcc3ca473f749c04a8e1 /epan/dfilter/dfunctions.c | |
parent | db85625af95df547aba6afef2ba293a1cc49fd4e (diff) |
dfilter: Improve grammar to parse functions
A function is grammatically an identifier that is followed by '(' and ')'
according to some rules. We should avoid assuming a token is a function
just because it matches a registered function name.
Before:
Filter: foobar(http.user_agent) contains "UPDATE"
dftest: Syntax error near "(".
After:
Filter: foobar(http.user_agent) contains "UPDATE"
dftest: The function 'foobar' does not exist.
This has the problem that a function cannot have the same name
as a protocol but that limitation already existed before.
Diffstat (limited to 'epan/dfilter/dfunctions.c')
-rw-r--r-- | epan/dfilter/dfunctions.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dfilter/dfunctions.c b/epan/dfilter/dfunctions.c index c38727ea73..04d885a221 100644 --- a/epan/dfilter/dfunctions.c +++ b/epan/dfilter/dfunctions.c @@ -318,7 +318,7 @@ df_functions[] = { /* Lookup a display filter function record by name */ df_func_def_t* -df_func_lookup(char *name) +df_func_lookup(const char *name) { df_func_def_t *func_def; |