Wireshark-commits: [Wireshark-commits] master-3.0 5ab732f: What we're testing for is byte-swappedne

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Mon, 02 Sep 2019 23:47:49 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=5ab732f7bd184097bbcc249b4a351fdc8674b10f
Submitter: "Guy Harris <guy@xxxxxxxxxxxx>"
Changed: branch: master-3.0
Repository: wireshark

Commits:

5ab732f by Guy Harris (guy@xxxxxxxxxxxx):

    What we're testing for is byte-swappedness, not raw endianness.
    
    On a big-endian machine, if the upper 16 bits of the length are non-zero
    and the lower 16 bits are zero, that means that the length is
    *little*-endian.
    
    What we really care about is whether the file is in the reading host's
    native format, so we can just fetch integral values without swapping, or
    not in that format, in which case we have to byte-swap integral values.
    
    Rename the variable and redo the code to match.
    
    (This may have caused the PacketLogger reader to fail on big-endian
    machines.)
    
    Change-Id: Ie1a82a7d40e2c58c0b8d482d7c95ab60061ca980
    Ping-Bug: 10861
    Reviewed-on: https://code.wireshark.org/review/34434
    Petri-Dish: Guy Harris <guy@xxxxxxxxxxxx>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
    (cherry picked from commit 45eadc049e5dce4d0181050f55a0d5709ac9c3c8)
    Reviewed-on: https://code.wireshark.org/review/34435
    

Actions performed:

    from  f880c37   [Automatic update for 2019-09-01]
     add  5ab732f   What we're testing for is byte-swappedness, not raw endianness.


Summary of changes:
 wiretap/packetlogger.c | 31 ++++++++++++++-----------------
 1 file changed, 14 insertions(+), 17 deletions(-)