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

Commits:

6e4e5c0 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>
    (cherry picked from commit c2e74c5fc2cf9c0f6d85c2e6ce5bcb0cfb777b26)
    Reviewed-on: https://code.wireshark.org/review/20483
    

Actions performed:

    from  e5d0bde   nstrace: fix size of vmnames
    adds  6e4e5c0   Don't cast to a too-large size.


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