Wireshark-commits: [Wireshark-commits] master fac8c25: Don't just grab raw string data with tvb_mem
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=fac8c25bb133ef241f5d3d034751727a59fa2b87
Submitter: "Guy Harris <guy@xxxxxxxxxxxx>"
Changed: branch: master
Repository: wireshark
Commits:
fac8c25 by Guy Harris (guy@xxxxxxxxxxxx):
Don't just grab raw string data with tvb_memcpy().
Use proto_tree_add_item_ret_display_string() routines to add strings
if we want to display the string's value in a column, and just use
proto_tree_add_item() if we don't need the string's value. That way,
all strings are fetched using an encoding value, to properly map to
UTF-8, and, if necessary, are formatted for display.
Add comments asking about encodings.
Change-Id: I32dbdf17c90e77cc080d6132c740c8c5d19ef4c5
Reviewed-on: https://code.wireshark.org/review/33997
Petri-Dish: Guy Harris <guy@xxxxxxxxxxxx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
Actions performed:
from 2edaca6 Clean up comments.
add fac8c25 Don't just grab raw string data with tvb_memcpy().
Summary of changes:
plugins/epan/profinet/packet-pn-dcp.c | 88 ++++++++++++++++++++++++++++-------
1 file changed, 71 insertions(+), 17 deletions(-)