aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ber.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2011-01-02 21:49:00 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2011-01-02 21:49:00 +0000
commitefb5e34cb12145b7205effd4f238c002f3e40f7c (patch)
tree0bc2769bc20a76e9d2dfdf8f131dce7c2bc01192 /epan/dissectors/packet-ber.c
parent3a8ea0956b4ef1ad357d0764c606ed20b870b68b (diff)
Note that this is ultimately not necessarily the right fix.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35331 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-ber.c')
-rw-r--r--epan/dissectors/packet-ber.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/epan/dissectors/packet-ber.c b/epan/dissectors/packet-ber.c
index 66ab834b2e..bbb0f55b2e 100644
--- a/epan/dissectors/packet-ber.c
+++ b/epan/dissectors/packet-ber.c
@@ -576,6 +576,14 @@ ber_add_bad_length_error(packet_info *pinfo, proto_tree *tree,
* This is for use when a field that's nominally an OCTET STRING but
* where we want the string further interpreted, e.g. as a number or
* a network address or a UN*X-style time stamp.
+ *
+ * XXX - this duplicates the length checking in proto_tree_add_item()
+ * and the routines it calls; that should really be done in one
+ * place. We *do* want to report a dissector bug in proto_tree_add_item()
+ * if the dissector explicitly says, for example, "this IPv4 address is
+ * 7 bytes long", but we don't want to report a dissector bug if the
+ * *packet* says "this IPv4 address is 7 bytes long", we want to report
+ * a malformed packet.
*/
static proto_item *
ber_proto_tree_add_item(packet_info *pinfo, proto_tree *tree,