diff options
author | Michael Mann <mmann78@netscape.net> | 2016-12-18 23:38:53 -0500 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2016-12-19 13:20:56 +0000 |
commit | dd143ca7681e2e3150904b764027e041927dcbf2 (patch) | |
tree | 7dccf9ffeb7282c864ce0642ffb202057fa21e89 /epan/dissectors | |
parent | 36ec6240a8bc2cc8c30a2a1a1dc217c19fca0f4b (diff) |
[SMTP] Bugfix BDAT command handling
BDAT handling takes the whole packet to add to its count of necessary
bytes, but wasn't updating the offset, so if a BDAT "data packet" had
multiple CRLF segments in it, the BDAT byte counter became inaccurate.
Bug: 13030
Change-Id: Idd44ccb95a8f4710db4546a918661c63a343260c
Reviewed-on: https://code.wireshark.org/review/19343
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors')
-rw-r--r-- | epan/dissectors/packet-smtp.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/epan/dissectors/packet-smtp.c b/epan/dissectors/packet-smtp.c index 8b9f367e9e..fc4f1c9fb3 100644 --- a/epan/dissectors/packet-smtp.c +++ b/epan/dissectors/packet-smtp.c @@ -528,6 +528,10 @@ dissect_smtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_ * Check if we have reached end of the data chunk. */ session_state->msg_read_len += tvb_reported_length_remaining(tvb, loffset); + /* + * Since we're grabbing the rest of the packet, update the offset accordingly + */ + next_offset = tvb_reported_length(tvb); if (session_state->msg_read_len == session_state->msg_tot_len) { /* |