Wireshark-commits: [Wireshark-commits] master-1.12 270cb60: Pick array sizes based on what they're
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Mon, 21 Dec 2015 12:26:17 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=270cb60de10cc8850e09a3ac169199d3346bc2a9
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master-1.12
Repository: wireshark

Commits:

270cb60 by Guy Harris (guy@xxxxxxxxxxxx):

    Pick array sizes based on what they're supposed to hold.
    
    In AirPDcapRsnaPwd2PskStep(), digest[] holds an SSID plus 4 bytes of
    count, so the size is MAX_SSID_LENGTH plus 4, and digest1[] holds an
    SHA-1 digest, so the size is SHA1_DIGEST_LEN.
    
    That makes it a bit clearer why those are the sizes.
    
    Change-Id: I58ed6643f57675375f7f369470d600382323315f
    Reviewed-on: https://code.wireshark.org/review/8387
    Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
    (cherry picked from commit 7d4e0c73a3479560b6870f6d3cc7c2bdaab810b3)
    Reviewed-on: https://code.wireshark.org/review/12786
    

Actions performed:

    from  16595d4   Add some bounds checks.
    adds  270cb60   Pick array sizes based on what they're supposed to hold.


Summary of changes:
 epan/crypt/airpdcap.c |   13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)