aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJamil Nimeh <jnimeh@gmail.com>2014-08-26 18:26:19 +0200
committerPascal Quantin <pascal.quantin@gmail.com>2014-09-01 15:00:22 +0000
commitf2a7a6d50378ff6000e8c777855df945165ca125 (patch)
treebc441c8de1bfc418d77470af5d4cf295ad7cd09d
parentf20d5d7bd3b3fdbed06e68020337ccd2e6e53e42 (diff)
TLS: fix dissection of status_request_v2 hello extension
Bug: 10416 Change-Id: I58a3faef227f7eafd61942cafa6e38a17557ee61 Reviewed-on: https://code.wireshark.org/review/3865 Reviewed-by: Evan Huus <eapache@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
-rw-r--r--epan/dissectors/packet-ssl-utils.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/epan/dissectors/packet-ssl-utils.c b/epan/dissectors/packet-ssl-utils.c
index 56ee57c4db..bc92c9653c 100644
--- a/epan/dissectors/packet-ssl-utils.c
+++ b/epan/dissectors/packet-ssl-utils.c
@@ -5752,13 +5752,16 @@ static gint
ssl_dissect_hnd_hello_ext_status_request_v2(ssl_common_dissect_t *hf, tvbuff_t *tvb, proto_tree *tree,
guint32 offset)
{
- guint list_len;
+ gint32 list_len;
- list_len = tvb_get_ntoh24(tvb, offset);
- offset += 3;
+ list_len = tvb_get_ntohs(tvb, offset);
+ offset += 2;
- while (list_len-- > 0)
+ while (list_len > 0) {
+ guint32 prev_offset = offset;
offset = ssl_dissect_hnd_hello_ext_status_request(hf, tvb, tree, offset, TRUE);
+ list_len -= (offset - prev_offset);
+ }
return offset;
}