Wireshark-commits: [Wireshark-commits] master-3.0 4238520: Fix up the checks in nspm_signature_vers
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Sat, 16 Mar 2019 07:43:43 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=4238520611ee00888248a2b13e905e2ee3b86a67
Submitter: "Guy Harris <guy@xxxxxxxxxxxx>"
Changed: branch: master-3.0
Repository: wireshark

Commits:

4238520 by Guy Harris (guy@xxxxxxxxxxxx):

    Fix up the checks in nspm_signature_version().
    
    Move the read out of nspm_signature_version(), to make it a bit clearer
    what file I/O we do in the open process; have nspm_signature_version()
    just look for a signature in a single page.
    
    In the loop in nspm_signature_version(), make sure we have enough of the
    record header to look at the type and length fields in that header
    before looking at them and, when we can look at them, make sure the
    length of the record 1) fits in what remains of the page we're looking
    at and 2) is big enough to be the length of a signature record.
    
    Change-Id: I7d625859136e6f39c40b166067fc7efea806d9b0
    Reviewed-on: https://code.wireshark.org/review/32426
    Petri-Dish: Guy Harris <guy@xxxxxxxxxxxx>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
    (cherry picked from commit 1d1450f0c2f571c66706478604a4b6940d6153d6)
    Reviewed-on: https://code.wireshark.org/review/32428
    

Actions performed:

    from  3ced6f5   netscaler: add more sanity checks.
     add  4238520   Fix up the checks in nspm_signature_version().


Summary of changes:
 wiretap/netscaler.c | 129 +++++++++++++++++++++++++++++++++++++---------------
 1 file changed, 93 insertions(+), 36 deletions(-)