aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-acse.c
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2005-10-13 01:39:53 +0000
committerRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2005-10-13 01:39:53 +0000
commit719be762911c7e0259ee62fc29a184184f5acde7 (patch)
treec37a8d039eccf5762ccd5c21706ee259fbccfbc3 /epan/dissectors/packet-acse.c
parent461b05a96497bb0821bc1bf93c76fddd3682d244 (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 'epan/dissectors/packet-acse.c')
-rw-r--r--epan/dissectors/packet-acse.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/epan/dissectors/packet-acse.c b/epan/dissectors/packet-acse.c
index 2581a2da36..5905d57ca1 100644
--- a/epan/dissectors/packet-acse.c
+++ b/epan/dissectors/packet-acse.c
@@ -1,6 +1,6 @@
/* Do not modify this file. */
/* It is created automatically by the ASN.1 to Ethereal dissector compiler */
-/* .\packet-acse.c */
+/* ./packet-acse.c */
/* ../../tools/asn2eth.py -X -b -e -p acse -c acse.cnf -s packet-acse-template acse.asn */
/* Input file: packet-acse-template.c */
@@ -1917,9 +1917,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;
}