diff options
author | Pascal Quantin <pascal.quantin@gmail.com> | 2015-02-10 12:07:47 +0100 |
---|---|---|
committer | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2015-02-10 13:24:59 +0000 |
commit | 7369c25ad41ef075688420f53f353e8e6c4ddfdb (patch) | |
tree | c1b3169b440764c73eebc6e310c379f2454ef5ba /epan | |
parent | 29be26c4b3b387027abcab3c859643f0ee12e5cf (diff) |
IMAP: do not iterate over reported length when using tvb_find_line_end
This function can only search in captured length buffer
This fixes an ASAN failure reported by Alexis
Change-Id: Ib936f918e057423d63ff34a5fc79fed602e56dfc
Reviewed-on: https://code.wireshark.org/review/7052
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-imap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/packet-imap.c b/epan/dissectors/packet-imap.c index 845a20cdf8..a95da306f4 100644 --- a/epan/dissectors/packet-imap.c +++ b/epan/dissectors/packet-imap.c @@ -125,7 +125,7 @@ dissect_imap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) hidden_item = proto_tree_add_boolean(imap_tree, hf_imap_isrequest, tvb, 0, 0, is_request); PROTO_ITEM_SET_HIDDEN(hidden_item); - while(tvb_reported_length_remaining(tvb, offset) > 0) { + while(tvb_offset_exists(tvb, offset)) { /* * Find the end of each line |