Be sure to assign the return value of tvb_length_remaining() to a signed integer and not an unsigned integer, and then check that value is > 0.
svn path=/trunk/; revision=43720
This commit is contained in:
parent
0d41b6edad
commit
e173f01c5c
@ -1402,11 +1402,15 @@ static int dissect_cops_pr_object_data(tvbuff_t *tvb, packet_info *pinfo, guint3
|
|||||||
dissect_ber_object_identifier(FALSE, &actx, asn_tree, tvb, offset, hf_cops_pprid_oid, &oid_tvb);
|
dissect_ber_object_identifier(FALSE, &actx, asn_tree, tvb, offset, hf_cops_pprid_oid, &oid_tvb);
|
||||||
|
|
||||||
if (oid_tvb) {
|
if (oid_tvb) {
|
||||||
guint encoid_len = tvb_length_remaining(oid_tvb,0);
|
gint encoid_len;
|
||||||
guint8* encoid = ep_tvb_memdup(oid_tvb,0,encoid_len);
|
guint8* encoid;
|
||||||
|
|
||||||
|
encoid_len = tvb_length_remaining(oid_tvb,0);
|
||||||
|
if (encoid_len > 0) {
|
||||||
|
encoid = ep_tvb_memdup(oid_tvb,0,encoid_len);
|
||||||
(*pprid_subids_len) = oid_encoded2subid(encoid, encoid_len, pprid_subids);
|
(*pprid_subids_len) = oid_encoded2subid(encoid, encoid_len, pprid_subids);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case COPS_OBJ_PRID: {
|
case COPS_OBJ_PRID: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user