URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=2c7e0a93e5f205bb61fb675d7de1b0ca9b5c0746
Submitter: "Guy Harris <guy@xxxxxxxxxxxx>"
Changed: branch: master
Repository: wireshark
Commits:
2c7e0a9 by Guy Harris (guy@xxxxxxxxxxxx):
Add a routine to fetch raw bytes into a fixed-length buffer as a string.
That's what the remaining calls to tvb_get_nstringz() and
tvb_get_nstringz0() are being used to do, even though those routines
were not intended for that purpose - the calls are extracting from a
text protcool, meaning that the strings are *not* null-terminate in the
packet.
Strings - even null-terminated ones - should, in almost all cases, be
extracted by tvb_get_string_enc() or routines that call it, so that an
encoding is specified. In the few cases where we're fetching strings
only to be compared to ASCII constants, or to parse as numbers, we can
get away with this.
Change-Id: I29f0532902c4ade2207de7f06db69c32eafd4132
Reviewed-on: https://code.wireshark.org/review/34072
Petri-Dish: Guy Harris <guy@xxxxxxxxxxxx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
Actions performed:
from c557809 Clean up handling of group lists.
add 2c7e0a9 Add a routine to fetch raw bytes into a fixed-length buffer as a string.
Summary of changes:
debian/libwireshark0.symbols | 1 +
epan/tvbuff.c | 32 ++++++++++++++++++++++++++++++++
epan/tvbuff.h | 8 ++++++++
3 files changed, 41 insertions(+)