diff options
author | Peter Wu <peter@lekensteyn.nl> | 2014-07-04 17:28:46 +0200 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2014-07-06 22:05:26 +0000 |
commit | 49bc1047be0ed7b1bafcffb0f77e84aead056c0a (patch) | |
tree | c4864438ea21b11171a311aa0e47c880a1772f54 /epan/dissectors/packet-whois.c | |
parent | 5bfc21cf9e42af13a8d1ad6eb545ab82cb7dbe9d (diff) |
whois,finger: fix retval, convert from tvb_length
Fixes dissector bug:
failed assertion "save_desegment_offset == pinfo->desegment_offset &&
save_desegment_len == pinfo->desegment_len"
Change-Id: Ia475bea3726252530189a05ba4dbf69f3c2b7e6c
Reviewed-on: https://code.wireshark.org/review/2886
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-whois.c')
-rw-r--r-- | epan/dissectors/packet-whois.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/epan/dissectors/packet-whois.c b/epan/dissectors/packet-whois.c index c9d70ed5e2..a95a4d2e8e 100644 --- a/epan/dissectors/packet-whois.c +++ b/epan/dissectors/packet-whois.c @@ -78,14 +78,14 @@ dissect_whois(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, conversation_add_proto_data(conversation, proto_whois, whois_trans); } - len = tvb_length(tvb); + len = tvb_reported_length(tvb); if (!PINFO_FD_VISITED(pinfo)) { if (pinfo->can_desegment) { if (is_query) { if ((len < 2) || (tvb_memeql(tvb, len - 2, "\r\n", 2))) { pinfo->desegment_len = DESEGMENT_ONE_MORE_SEGMENT; pinfo->desegment_offset = 0; - return (0); + return -1; } else { whois_trans->req_frame = pinfo->fd->num; whois_trans->req_time = pinfo->fd->abs_ts; @@ -93,7 +93,7 @@ dissect_whois(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, } else { pinfo->desegment_len = DESEGMENT_UNTIL_FIN; pinfo->desegment_offset = 0; - return (0); + return -1; } } } else if (is_query && (whois_trans->req_frame == 0)) { @@ -148,7 +148,7 @@ dissect_whois(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, } } - return (len); + return tvb_captured_length(tvb); } void |