diff options
author | AndersBroman <anders.broman@ericsson.com> | 2015-08-04 10:46:48 +0200 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2015-08-04 08:54:14 +0000 |
commit | 6e87802ec0bf39085f261863ce518e4c6f4d08c8 (patch) | |
tree | a46cc97539bd094bd9ae3fcc4b98e0afddbe8fa8 | |
parent | 2964c281ab4cda312e235ba79bae3c5bcc30a60e (diff) | |
download | wireshark-6e87802ec0bf39085f261863ce518e4c6f4d08c8.tar.gz |
tvb_new_octet_aligned() should return both the captured and reported
length set to datalen in the returned tvb.
Change-Id: Ie6649a285a9fa4a0564e29ce18ec9459b8da2541
Reviewed-on: https://code.wireshark.org/review/9861
Reviewed-by: Anders Broman <a.broman58@gmail.com>
-rw-r--r-- | epan/tvbuff.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/tvbuff.c b/epan/tvbuff.c index e608339679..23353769ae 100644 --- a/epan/tvbuff.c +++ b/epan/tvbuff.c @@ -341,7 +341,7 @@ tvb_new_octet_aligned(tvbuff_t *tvb, guint32 bit_offset, gint32 no_of_bits) /* already aligned -> shortcut */ if ((left == 0) && (remaining_bits == 0)) { - return tvb_new_subset(tvb, byte_offset, datalen, -1); + return tvb_new_subset(tvb, byte_offset, datalen, datalen); } DISSECTOR_ASSERT(datalen>0); |