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

Commits:

c38d416 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/37140
    

Actions performed:

    from  1c1f9b3   Fix calculation of fractional part of time stamps.
     add  c38d416   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(-)