diff options
author | Michael Mann <mmann78@netscape.net> | 2015-08-25 19:14:59 -0400 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2015-08-27 04:34:10 +0000 |
commit | 0af048b7e40ee92d6702df873cbc515ae2eff9c8 (patch) | |
tree | f980825d5b37ce5c5d322b149c122b0704edd6ff /epan/dissectors/packet-ldss.c | |
parent | 374439daa17fe2692746857b920616354ce658e7 (diff) | |
download | wireshark-0af048b7e40ee92d6702df873cbc515ae2eff9c8.tar.gz |
Remove calls of tvb_ensure_length_remaining.
The remaining calls seem to fall into 3 categories:
1. passing it to tvb_find_line_end when -1 (for length) will do.
2. duplicating the checking of tvb_reported_length_remaining, which is already in use near the tvb_ensure_length_remaining call.
3. Those that (probably) need tvb_ensure_capture_length_remaining
Change-Id: I1e77695251e055644bcbbb89f3c181c65d1671ca
Reviewed-on: https://code.wireshark.org/review/10268
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-ldss.c')
-rw-r--r-- | epan/dissectors/packet-ldss.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/epan/dissectors/packet-ldss.c b/epan/dissectors/packet-ldss.c index bf50cb8f51..1d04153ddc 100644 --- a/epan/dissectors/packet-ldss.c +++ b/epan/dissectors/packet-ldss.c @@ -517,9 +517,7 @@ dissect_ldss_transfer (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void gboolean is_digest_line; guint digest_type_len; - linelen = tvb_find_line_end(tvb, offset, - tvb_ensure_length_remaining(tvb, offset), &next_offset, - FALSE); + linelen = tvb_find_line_end(tvb, offset, -1, &next_offset, FALSE); /* Include new-line in line */ line = (guint8 *)tvb_memdup(NULL, tvb, offset, linelen+1); /* XXX - memory leak? */ |