Wireshark-commits: [Wireshark-commits] master-2.2 cca9f82: Don't cast to a too-large size.

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Fri, 10 Mar 2017 04:33:10 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=cca9f82b18cce4496c45794e8d1f2e019f60eb4e
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master-2.2
Repository: wireshark

Commits:

cca9f82 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/20482
    

Actions performed:

    from  78b7653   nstrace: fix size of vmnames
    adds  cca9f82   Don't cast to a too-large size.


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