diff options
author | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2005-10-13 01:39:53 +0000 |
---|---|---|
committer | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2005-10-13 01:39:53 +0000 |
commit | 719be762911c7e0259ee62fc29a184184f5acde7 (patch) | |
tree | c37a8d039eccf5762ccd5c21706ee259fbccfbc3 /asn1/acse/packet-acse-template.c | |
parent | 461b05a96497bb0821bc1bf93c76fddd3682d244 (diff) |
fix for bug 529
a CHOICE might not consume any butes in teh encoding if there were no matching
choice arms found.
make the loop in acse abort with malformed packet if the choice failed to decode anything to prevent an infinite loop in bug 529
svn path=/trunk/; revision=16207
Diffstat (limited to 'asn1/acse/packet-acse-template.c')
-rw-r--r-- | asn1/acse/packet-acse-template.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/asn1/acse/packet-acse-template.c b/asn1/acse/packet-acse-template.c index abda0486de..c4052795da 100644 --- a/asn1/acse/packet-acse-template.c +++ b/asn1/acse/packet-acse-template.c @@ -218,9 +218,10 @@ dissect_acse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) /* we can't make any additional checking here */ /* postpone it before dissector will have more information */ while (tvb_reported_length_remaining(tvb, offset) > 0){ + int old_offset=offset; offset = dissect_acse_ACSE_apdu(FALSE, tvb, offset, pinfo, tree, -1); - if(offset == FALSE ){ - proto_tree_add_text(tree, tvb, offset, -1,"Internal error"); + if(offset == old_offset ){ + proto_tree_add_text(tree, tvb, offset, -1,"Malformed packet"); offset = tvb_length(tvb); break; } |