Wireshark-commits: [Wireshark-commits] master c2e74c5: Don't cast to a too-large size.
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Fri, 10 Mar 2017 04:21:33 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=c2e74c5fc2cf9c0f6d85c2e6ce5bcb0cfb777b26
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

c2e74c5 by Guy Harris (guy@xxxxxxxxxxxx):

    Don't cast to a too-large size.
    
    The maximum record length is 255*128 + 127 = 32767; that fits in a
    guint32, which is large enough to support the biggest packet we'd ever
    support without stretching several size values to 64 bits.
    
    It's not a size of an object in memory, so it doesn't have to be a
    size_t, and a size_t could be too large to fit in the record sizes we're
    using.
    
    Just cast to guint32.
    
    Change-Id: Ie664fda3ce9945893fd992bbb9a81a5d632a3fcb
    Reviewed-on: https://code.wireshark.org/review/20479
    Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
    

Actions performed:

    from  fe285c6   Replace aes.c and des.c by Libgcrypt
    adds  c2e74c5   Don't cast to a too-large size.


Summary of changes:
 wiretap/netscaler.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)