forked from osmocom/wireshark
PER: Check length calling tvb_new_octet_aligned()
Fix calling tvb_new_octet_aligned() with length == 0 Related to #17890 case 1 and 6
This commit is contained in:
parent
1f22c7e04c
commit
64f98ee13c
|
@ -1138,6 +1138,10 @@ dissect_per_integer(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree
|
|||
length=4;
|
||||
}
|
||||
|
||||
if(length == 0){
|
||||
dissect_per_not_decoded_yet(tree, actx->pinfo, tvb, "unexpected length");
|
||||
}
|
||||
|
||||
if (actx->aligned) BYTE_ALIGN_OFFSET(offset);
|
||||
val_tvb = tvb_new_octet_aligned(tvb, offset, length * 8);
|
||||
val=0;
|
||||
|
|
Loading…
Reference in New Issue