aboutsummaryrefslogtreecommitdiffstats
path: root/asn1
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2015-02-21 23:06:56 +0100
committerMichael Mann <mmann78@netscape.net>2015-03-10 13:00:56 +0000
commitea0e4892e98056cff33fa64c53f9763c0322f86a (patch)
tree964ab146bfc564b855a8dd71385614faf5b49cd7 /asn1
parentd2b9a4b1703344ebedd0b02c46673419bb0f8ea4 (diff)
packet-ldap: use the correct tvb to report the SASL wrapped payload
Ping-Bug: 9398 Change-Id: I163d3dc99562b3388470c58d05e2d4d2e2f6d00c Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-on: https://code.wireshark.org/review/7477 Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'asn1')
-rw-r--r--asn1/ldap/packet-ldap-template.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/asn1/ldap/packet-ldap-template.c b/asn1/ldap/packet-ldap-template.c
index 81828c949c..2fae157d9b 100644
--- a/asn1/ldap/packet-ldap-template.c
+++ b/asn1/ldap/packet-ldap-template.c
@@ -1229,6 +1229,7 @@ static void
if (decr_tvb) {
proto_tree *enc_tree = NULL;
+ guint decr_len = tvb_reported_length(decr_tvb);
/*
* The LDAP message was encrypted in the packet, and has
@@ -1237,14 +1238,14 @@ static void
col_set_str(pinfo->cinfo, COL_INFO, "SASL GSS-API Privacy (decrypted): ");
if (sasl_tree) {
- enc_tree = proto_tree_add_subtree_format(sasl_tree, gssapi_tvb, ver_len, -1,
+ enc_tree = proto_tree_add_subtree_format(sasl_tree, decr_tvb, 0, -1,
ett_ldap_payload, NULL, "GSS-API Encrypted payload (%d byte%s)",
- sasl_len - ver_len,
- plurality(sasl_len - ver_len, "", "s"));
+ decr_len, plurality(decr_len, "", "s"));
}
dissect_ldap_payload(decr_tvb, pinfo, enc_tree, ldap_info, is_mscldap);
} else if (plain_tvb) {
proto_tree *plain_tree = NULL;
+ guint plain_len = tvb_reported_length(plain_tvb);
/*
* The LDAP message wasn't encrypted in the packet;
@@ -1253,10 +1254,9 @@ static void
col_set_str(pinfo->cinfo, COL_INFO, "SASL GSS-API Integrity: ");
if (sasl_tree) {
- plain_tree = proto_tree_add_subtree_format(sasl_tree, gssapi_tvb, ver_len, -1,
+ plain_tree = proto_tree_add_subtree_format(sasl_tree, plain_tvb, 0, -1,
ett_ldap_payload, NULL, "GSS-API payload (%d byte%s)",
- sasl_len - ver_len,
- plurality(sasl_len - ver_len, "", "s"));
+ plain_len, plurality(plain_len, "", "s"));
}
dissect_ldap_payload(plain_tvb, pinfo, plain_tree, ldap_info, is_mscldap);