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

Commits:

bec65cb 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>
    (backported from commit b99a0c95d8c3fec834da0b7be27b2fc385054646)
    Reviewed-on: https://code.wireshark.org/review/37141
    

Actions performed:

    from  36805f2   Fix calculation of fractional part of time stamps.
     add  bec65cb   pcapng (dissector): don't assume the endianness doesn't change.


Summary of changes:
 epan/dissectors/file-pcapng.c | 656 +++++++++++++++++++++++-------------------
 1 file changed, 355 insertions(+), 301 deletions(-)