aboutsummaryrefslogtreecommitdiffstats
path: root/packet-tcap.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2004-03-20 07:26:41 +0000
committerGuy Harris <guy@alum.mit.edu>2004-03-20 07:26:41 +0000
commit179b1541b0f4fd9f7b83c603dc27f9d4cc341f16 (patch)
tree29948e5e4e7eca7ad4402c204a52f9de83a58489 /packet-tcap.c
parentddc5a1773ac4fa682eaff622d43b3e7bf16c309c (diff)
In "dissect_tcap_tid()", check that the length of the transaction ID is
<= 4, so we don't copy more than 4 bytes to a 4-byte integer. svn path=/trunk/; revision=10416
Diffstat (limited to 'packet-tcap.c')
-rw-r--r--packet-tcap.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/packet-tcap.c b/packet-tcap.c
index 05e735bbb3..3929ffd049 100644
--- a/packet-tcap.c
+++ b/packet-tcap.c
@@ -9,7 +9,7 @@
*
* (append your name here for newer version)
*
- * $Id: packet-tcap.c,v 1.9 2004/03/19 07:54:57 guy Exp $
+ * $Id: packet-tcap.c,v 1.10 2004/03/20 07:26:41 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -378,6 +378,21 @@ dissect_tcap_tid(ASN1_SCK *asn1, proto_tree *tcap_tree, proto_item *ti, int type
dissect_tcap_len(asn1, subtree, &def_len, &len);
+ /*
+ * XXX - this is, I think, an OCTET STRING (SIZE(1..4)); should it
+ * just be put into the protocol tree as an FT_BYTES value and
+ * displayed in the Info column with "bytes_to_str()"?
+ *
+ * If so, should we have separate hf_tcap_source_tid and
+ * hf_tcap_destination_tid?
+ *
+ * Does that apply to other transaction IDs?
+ */
+ if (len > 4)
+ {
+ return TC_DS_FAIL;
+ }
+
saved_offset = asn1->offset;
ret = asn1_string_value_decode(asn1, len, &poctets);
val = 0;