Wireshark-commits: [Wireshark-commits] master-2.6 85859b2: 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:59 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=85859b2f002bed094fab3a80c34f2ae3407a9117
Submitter: "Guy Harris <guy@xxxxxxxxxxxx>"
Changed: branch: master-2.6
Repository: wireshark

Commits:

85859b2 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 c0839e2e2ae347483ad96e8b86ddfe8f2ab95bc0)
    Reviewed-on: https://code.wireshark.org/review/32429
    

Actions performed:

    from  fc8367a   netscaler: add more sanity checks.
     add  85859b2   Fix up the checks in nspm_signature_version().


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