aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dfilter
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss@ulticom.com>2010-12-03 22:59:16 +0000
committerJeff Morriss <jeff.morriss@ulticom.com>2010-12-03 22:59:16 +0000
commit39f6874d13d281b557428223e8d2a0d5e6f2feb3 (patch)
tree7540e8fcb6a10f24d115080840b229dfdeed201c /epan/dfilter
parent5a7b4defa3ccf532a411ae108bb0907d8cb59a41 (diff)
Fix a problem noticed in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5380#c2 :
Don't attempt to use a BASE_CUSTOM field's 'strings' field as a value_string: it's not, it's a pointer to a function. svn path=/trunk/; revision=35115
Diffstat (limited to 'epan/dfilter')
-rw-r--r--epan/dfilter/semcheck.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/epan/dfilter/semcheck.c b/epan/dfilter/semcheck.c
index 45b6f7127c..0b9fdee1de 100644
--- a/epan/dfilter/semcheck.c
+++ b/epan/dfilter/semcheck.c
@@ -230,6 +230,17 @@ mk_fvalue_from_val_string(header_field_info *hfinfo, char *s)
hfinfo->abbrev);
return NULL;
}
+ else if (hfinfo->display & BASE_CUSTOM) {
+ /* If a user wants to match against a custom string, we would
+ * somehow have to have the integer value here to pass it in
+ * to the custom-display function. But we don't have an
+ * integer, we have the string they're trying to match.
+ * -><-
+ */
+ dfilter_fail("\"%s\" cannot accept [custom] strings as values.",
+ hfinfo->abbrev);
+ return NULL;
+ }
else {
const value_string *vals = hfinfo->strings;
if (hfinfo->display & BASE_EXT_STRING)