diff options
author | martinm <martinm@f5534014-38df-0310-8fa8-9805f1628bb7> | 2007-03-16 14:09:12 +0000 |
---|---|---|
committer | martinm <martinm@f5534014-38df-0310-8fa8-9805f1628bb7> | 2007-03-16 14:09:12 +0000 |
commit | 731951a5a67f2407f6de5e7981ce4cc5bb0c6b3f (patch) | |
tree | 709bdedf25bf7112d781bbda6f6147b6bd2d7d50 /epan/dissectors/packet-cops.c | |
parent | 4042666b543dd362111f67ccd9658870c4a66c79 (diff) |
Turn an error that I've encountered into an easily findable expert item.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21036 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-cops.c')
-rw-r--r-- | epan/dissectors/packet-cops.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/epan/dissectors/packet-cops.c b/epan/dissectors/packet-cops.c index 655f54722e..f7e9e473af 100644 --- a/epan/dissectors/packet-cops.c +++ b/epan/dissectors/packet-cops.c @@ -76,6 +76,7 @@ #include <epan/dissectors/format-oid.h> #include <epan/prefs.h> +#include <epan/expert.h> #include "packet-ber.h" /* XXX - The "plain" COPS port (3288) can be overridden in the prefs. @@ -1260,8 +1261,13 @@ static void dissect_cops_object_data(tvbuff_t *tvb, packet_info *pinfo, guint32 if (c_type != 1) break; - if (tvb_strnlen(tvb, offset, len) == -1) - proto_tree_add_text(tree, tvb, offset, len, "<PEP Id is not a NUL terminated ASCII string>"); + if (tvb_strnlen(tvb, offset, len) == -1) { + proto_item *ti; + ti = proto_tree_add_text(tree, tvb, offset, len, "PEP Id is not a NULL terminated ASCII string"); + expert_add_info_format(pinfo, ti, PI_MALFORMED, PI_NOTE, + "PEP Id is not a NULL terminated ASCII string"); + PROTO_ITEM_SET_GENERATED(ti); + } else proto_tree_add_item(tree, hf_cops_pepid, tvb, offset, tvb_strnlen(tvb, offset, len) + 1, FALSE); |