Wireshark-commits: [Wireshark-commits] master-1.12 0880b43: Don't report an error for a non-multipl
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=0880b43640d6c0ab3440e746e65bff2e83ce7275
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master-1.12
Repository: wireshark
Commits:
0880b43 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: I691de489ffc800813dc9a6ab59ecc108540512d1
Reviewed-on: https://code.wireshark.org/review/12666
Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
Actions performed:
from a6c381e Perl: Using "defined(@array)" is deprecated.
adds 0880b43 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(-)