Wireshark-commits: [Wireshark-commits] master c2debdd: Don't assume address data is aligned.

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Sun, 04 Feb 2018 04:11:09 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=c2debddb2cd2ab8b0eff87ce37578c1f78f6864d
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

c2debdd by Guy Harris (guy@xxxxxxxxxxxx):

    Don't assume address data is aligned.
    
    The data for an address is *not* guaranteed to be aligned on any
    particular boundary, so, for IPv4 addresses, don't assume it's aligned
    on a 32-bit boundary - to get it in host byte order, fetch it with
    pntoh32(), which fetches a 32-bit value that's in network byte order,
    and isn't necessarily aligned on any particular boundary, and returns it
    in host byte order.
    
    Change-Id: Ic512ab4b1e0f2815d9f0af0e33714f456a08a45d
    Reviewed-on: https://code.wireshark.org/review/25589
    Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
    

Actions performed:

    from  676d466   Note that we should show ISBs in the "packet" list.
    adds  c2debdd   Don't assume address data is aligned.


Summary of changes:
 epan/dissectors/packet-icmp.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)