Don't try checksumming if we didn't capture all the data to be checksummed.
Check the captured length as well as the reported length, as is done in other checksumming code paths. Change-Id: I55371d99a28ffd1325e7266037cced580077d80b Reviewed-on: https://code.wireshark.org/review/8272 Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
parent
27e480cf5a
commit
44d16019a2
|
@ -374,7 +374,8 @@ dissect_pimv1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U
|
|||
pim_length = length;
|
||||
}
|
||||
|
||||
if (!pinfo->fragmented && length >= pim_length) {
|
||||
if (!pinfo->fragmented && length >= pim_length &&
|
||||
tvb_captured_length(tvb) >= pim_length) {
|
||||
/*
|
||||
* The packet isn't part of a fragmented datagram and isn't
|
||||
* truncated, so we can checksum it.
|
||||
|
@ -864,7 +865,8 @@ dissect_pim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
|
|||
*/
|
||||
pim_length = length;
|
||||
}
|
||||
if (!pinfo->fragmented && length >= pim_length) {
|
||||
if (!pinfo->fragmented && length >= pim_length &&
|
||||
tvb_captured_length(tvb) >= pim_length) {
|
||||
/*
|
||||
* The packet isn't part of a fragmented datagram and isn't
|
||||
* truncated, so we can checksum it.
|
||||
|
|
Loading…
Reference in New Issue