Wireshark-commits: [Wireshark-commits] master-2.0 e22b3ed: Don't report an error for a non-multiple

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Wed, 16 Dec 2015 00:45:49 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=e22b3edda863c2720f0de0038f633898f6efdf47
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master-2.0
Repository: wireshark

Commits:

e22b3ed by Guy Harris (guy@xxxxxxxxxxxx):

    Don't report an error for a non-multiple-of-4 chunk length.
    
    To quote RFC 4960:
    
    Chunk Length: 16 bits (unsigned integer)
    
          This value represents the size of the chunk in bytes, including
          the Chunk Type, Chunk Flags, Chunk Length, and Chunk Value fields.
          Therefore, if the Chunk Value field is zero-length, the Length
          field will be set to 4.  *The Chunk Length field does not count any
          chunk padding.*
    
          Chunks (including Type, Length, and Value fields) are padded out
          by the sender with all zero bytes to be a multiple of 4 bytes
          long.  This padding MUST NOT be more than 3 bytes in total.  The
          Chunk Length value does not include terminating padding of the
          chunk.  However, it does include padding of any variable-length
          parameter except the last parameter in the chunk.  The receiver
          MUST ignore the padding.
    
          Note: A robust implementation should accept the chunk whether or
          not the final padding has been included in the Chunk Length.
    
    so the the chunk is *not* required to include the length of the final
    padding in the chunk, although any padding *between* variable-length
    parameters in the chunk must be included in the length (obviously, as
    it's part of the chunk data).
    
    Change-Id: I99d64fdd907c41229aa9ad10a230fff4bcdfa5f4
    Reviewed-on: https://code.wireshark.org/review/12664
    Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
    (cherry picked from commit 68ca26ec75fb9cccbb64a859cafa1fb2c3d0cce7)
    Reviewed-on: https://code.wireshark.org/review/12665
    

Actions performed:

    from  47953f4   Qt: apply '-Y' display filter unconditionally and not only when opening a capture file
    adds  e22b3ed   Don't report an error for a non-multiple-of-4 chunk length.


Summary of changes:
 epan/dissectors/packet-sctp.c |    2 --
 1 file changed, 2 deletions(-)