PER: Fix call_per_oid_callback() open type length is in bytes.

tvb_new_octet_aligned() expects the length in bits.
This commit is contained in:
AndersBroman 2022-10-24 19:49:04 +02:00
parent 85a9e05c52
commit 92d58f297d
1 changed files with 2 additions and 1 deletions

View File

@ -2744,7 +2744,8 @@ call_per_oid_callback(const char *oid, tvbuff_t *tvb, packet_info *pinfo, proto_
end_offset = offset + type_length;
val_tvb = tvb_new_octet_aligned(tvb, offset, type_length);
/* length in bits */
val_tvb = tvb_new_octet_aligned(tvb, offset, type_length * 8);
if ((offset & 7) != 0) {
add_new_data_source(actx->pinfo, val_tvb, "Unaligned OCTET STRING");
}