diff options
author | João Valverde <j@v6e.pt> | 2021-10-08 17:33:36 +0100 |
---|---|---|
committer | João Valverde <j@v6e.pt> | 2021-10-08 18:53:15 +0100 |
commit | 9d87c4712eb51fefa2ed1f7b023945d18c8cc6ca (patch) | |
tree | 1674fa512d09dbe657c0ea4fe5df245eaedced51 /epan | |
parent | 39e0b3155f62de73429416ce2d6aee8ceb7a5ec9 (diff) |
dfilter: Fix parsing of value strings
If we have a STRING value in an expression and a numeric comparison
we must also check if it matches a value string before throwing
a type error.
Add appropriate tests to the test suite.
Fixes 4d2f4692129b1953c8631d58036bd6ce8cde6d50.
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dfilter/semcheck.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dfilter/semcheck.c b/epan/dfilter/semcheck.c index 3799f829b3..5c905c08a2 100644 --- a/epan/dfilter/semcheck.c +++ b/epan/dfilter/semcheck.c @@ -800,7 +800,7 @@ check_relation_LHS_FIELD(dfwork_t *dfw, const char *relation_string, } if (type2 == STTYPE_STRING) { - fvalue = dfilter_fvalue_from_string(dfw, ftype1, st_arg2, NULL); + fvalue = dfilter_fvalue_from_string(dfw, ftype1, st_arg2, hfinfo1); } else if (type2 == STTYPE_CHARCONST && strcmp(relation_string, "contains") == 0) { |