diff options
author | Peter Wu <peter@lekensteyn.nl> | 2014-07-11 10:40:47 +0200 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2014-07-12 12:06:50 +0000 |
commit | 9e5e43ba449b4431f9db0cb77cd0fa3171acf7d4 (patch) | |
tree | 945ff6ce3772baa59f4aa148843edf7f83cab6d0 | |
parent | ea4b2f486d3da482c51dbbd399a41ee320ea49d7 (diff) |
dtls: fix faulty offsets and tvbuff references
This could lead to problems for fragmented DTLS packets.
Change-Id: I602c7e181ea3799a4a2e7bcfed05bfbb129f7df4
Reviewed-on: https://code.wireshark.org/review/3017
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Evan Huus <eapache@gmail.com>
-rw-r--r-- | epan/dissectors/packet-dtls.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/packet-dtls.c b/epan/dissectors/packet-dtls.c index f1704c192b..b641157e7e 100644 --- a/epan/dissectors/packet-dtls.c +++ b/epan/dissectors/packet-dtls.c @@ -1374,7 +1374,7 @@ dissect_dtls_handshake(tvbuff_t *tvb, packet_info *pinfo, break; case SSL_HND_SERVER_KEY_EXCHG: - ssl_dissect_hnd_srv_keyex(&dissect_dtls_hf, sub_tvb, ssl_hand_tree, offset, length, session); + ssl_dissect_hnd_srv_keyex(&dissect_dtls_hf, sub_tvb, ssl_hand_tree, 0, length, session); break; case SSL_HND_CERT_REQUEST: @@ -1390,12 +1390,12 @@ dissect_dtls_handshake(tvbuff_t *tvb, packet_info *pinfo, break; case SSL_HND_CLIENT_KEY_EXCHG: - ssl_dissect_hnd_cli_keyex(&dissect_dtls_hf, tvb, ssl_hand_tree, offset, length, session); + ssl_dissect_hnd_cli_keyex(&dissect_dtls_hf, sub_tvb, ssl_hand_tree, 0, length, session); /* here we can have all the data to build session key */ if (!ssl) break; - if (ssl_generate_pre_master_secret(ssl, length, tvb, offset, dtls_options.psk, dtls_options.keylog_filename) < 0) { + if (ssl_generate_pre_master_secret(ssl, length, sub_tvb, 0, dtls_options.psk, dtls_options.keylog_filename) < 0) { ssl_debug_printf("dissect_dtls_handshake can't generate pre master secret\n"); break; } |