diff options
author | morriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7> | 2010-12-03 22:59:16 +0000 |
---|---|---|
committer | morriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7> | 2010-12-03 22:59:16 +0000 |
commit | abfc57fe816425bd419ace2a1846d80f5f5fe97d (patch) | |
tree | 7540e8fcb6a10f24d115080840b229dfdeed201c /epan | |
parent | d92fa321fb2bb22be4bc5b55cb0e8ea1e0f119d9 (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.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35115 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dfilter/semcheck.c | 11 |
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) |