diff options
author | Jeff Morriss <jeff.morriss@ulticom.com> | 2010-10-27 18:26:54 +0000 |
---|---|---|
committer | Jeff Morriss <jeff.morriss@ulticom.com> | 2010-10-27 18:26:54 +0000 |
commit | 4a120508d6ae38463b1eafff2df84430cef09cf3 (patch) | |
tree | e3922337cce2eb93a723ddd517d3db57ce60d140 /epan/dissectors/packet-dtls.c | |
parent | e111567e7e36de71f0f9a18edcdb7685f94335e1 (diff) |
Fix the reassembly assertion reported in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3881 :
Ensure the fragment bytes exist before passing them to the reassembly code.
svn path=/trunk/; revision=34662
Diffstat (limited to 'epan/dissectors/packet-dtls.c')
-rw-r--r-- | epan/dissectors/packet-dtls.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/epan/dissectors/packet-dtls.c b/epan/dissectors/packet-dtls.c index d94e86da8b..9686026b51 100644 --- a/epan/dissectors/packet-dtls.c +++ b/epan/dissectors/packet-dtls.c @@ -1018,6 +1018,10 @@ dissect_dtls_handshake(tvbuff_t *tvb, packet_info *pinfo, if (frag_hand) { /* Fragmented handshake message */ pinfo->fragmented = TRUE; + + /* Don't pass the reassembly code data that doesn't exist */ + tvb_ensure_bytes_exist(tvb, fragment_offset, fragment_length); + frag_msg = fragment_add(tvb, offset+12, pinfo, message_seq, dtls_fragment_table, fragment_offset, fragment_length, TRUE); @@ -1499,10 +1503,9 @@ dissect_dtls_hnd_cli_hello(tvbuff_t *tvb, } -static void dissect_dtls_hnd_hello_verify_request(tvbuff_t *tvb, - proto_tree *tree, - guint32 offset, - SslDecryptSession* ssl) +static void +dissect_dtls_hnd_hello_verify_request(tvbuff_t *tvb, proto_tree *tree, + guint32 offset, SslDecryptSession* ssl) { /* * struct { @@ -1789,8 +1792,7 @@ dissect_dtls_hnd_cert_req(tvbuff_t *tvb, } static void -dissect_dtls_hnd_finished(tvbuff_t *tvb, - proto_tree *tree, guint32 offset, +dissect_dtls_hnd_finished(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint* conv_version) { /* @@ -1865,8 +1867,7 @@ dtls_is_valid_handshake_type(guint8 type) } static gint -dtls_is_authoritative_version_message(guint8 content_type, - guint8 next_byte) +dtls_is_authoritative_version_message(guint8 content_type, guint8 next_byte) { if (content_type == SSL_ID_HANDSHAKE && dtls_is_valid_handshake_type(next_byte)) |