packet-dcm.c: Fix infinite loop
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1329 Bug: 13685 Change-Id: Ic70cf8185beeb4cfa9417c287cf963e1c56bf86c Reviewed-on: https://code.wireshark.org/review/21529 Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
parent
0e53c857e5
commit
538abdfbc2
|
@ -6692,7 +6692,7 @@ dissect_dcm_pdu_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
pdvlen_item = proto_tree_add_item(pdv_ptree, hf_dcm_pdv_len, tvb, offset, 4, ENC_BIG_ENDIAN);
|
||||
offset += 4;
|
||||
|
||||
if (pdv_len + 4 > pdu_len) {
|
||||
if ((pdv_len + 4 > pdu_len) || (pdv_len + 4 < pdv_len)) {
|
||||
expert_add_info_format(pinfo, pdvlen_item, &ei_dcm_pdv_len, "Invalid PDV length (too large)");
|
||||
return endpos;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue