Wireshark-commits: [Wireshark-commits] master-3.2 8d2600d: pcapng (dissector): don't assume the end
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Tue, 05 May 2020 01:34:41 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=8d2600d8c526e84055ef201e90c3f50d5ea24d25
Submitter: "Guy Harris <gharris@xxxxxxxxx>"
Changed: branch: master-3.2
Repository: wireshark

Commits:

8d2600d by Guy Harris (guy@xxxxxxxxxxxx):

    pcapng (dissector): don't assume the endianness doesn't change.
    
    Keep the endianness (as an ENC_ value) in the info structure we use
    while dissecting.
    
    When dissecting an SPB, peek ahead at the byte-order magic before
    dissecting the block length, to determine the byte order of all fields
    in that block *and* all other blocks in that section.  Report an error
    and stop dissecting if the byte-order magic isn't valid.
    
    Change-Id: I6d94d4fad10d60f327f4a486e180cdcee2f6be2d
    Reviewed-on: https://code.wireshark.org/review/37138
    Petri-Dish: Guy Harris <gharris@xxxxxxxxx>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: Guy Harris <gharris@xxxxxxxxx>
    (cherry picked from commit 2e7a01b56ae976e28583ceef7d0be56f13bea664)
    Reviewed-on: https://code.wireshark.org/review/37139
    

Actions performed:

    from  26da8c7   Fix calculation of fractional part of time stamps.
     add  8d2600d   pcapng (dissector): don't assume the endianness doesn't change.


Summary of changes:
 epan/dissectors/file-pcapng.c | 698 +++++++++++++++++++++++-------------------
 1 file changed, 376 insertions(+), 322 deletions(-)