aboutsummaryrefslogtreecommitdiffstats
path: root/epan
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 /epan
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 'epan')
-rw-r--r--epan/dissectors/packet-ldap.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/epan/dissectors/packet-ldap.c b/epan/dissectors/packet-ldap.c
index 9077578904..ffa3087e8a 100644
--- a/epan/dissectors/packet-ldap.c
+++ b/epan/dissectors/packet-ldap.c
@@ -4157,6 +4157,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
@@ -4165,14 +4166,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;
@@ -4181,10 +4182,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);