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

Commits:

c0839e2 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>
    

Actions performed:

    from  a4251ec   decode-as: Write the entries sorted to file.
     add  c0839e2   Fix up the checks in nspm_signature_version().


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