aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ber.c
diff options
context:
space:
mode:
authorsahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>2005-04-21 21:37:23 +0000
committersahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>2005-04-21 21:37:23 +0000
commitfc6972ceb218effb6cec35ecb8d469e8f6fa1a50 (patch)
treeaa660adef57c895c263c282c92e6ed8be2f784b8 /epan/dissectors/packet-ber.c
parent0ef7c335a38ccc007d1391ec04fca19bd13821bd (diff)
from Olivier J
bugfix for IMPLICIT NULL in BER sequences and gsmmap updates git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@14160 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-ber.c')
-rw-r--r--epan/dissectors/packet-ber.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/epan/dissectors/packet-ber.c b/epan/dissectors/packet-ber.c
index c3f4793d8f..4bef42f16a 100644
--- a/epan/dissectors/packet-ber.c
+++ b/epan/dissectors/packet-ber.c
@@ -869,12 +869,15 @@ printf("SEQUENCE dissect_ber_sequence(%s) subdissector ate %d bytes\n",name,coun
}
#endif
seq++;
- offset = hoffset+count;
- /* if it was optional and no bytes were eaten,
- just try again.
- */
- if((count==0)&&(seq->flags&BER_FLAGS_OPTIONAL)){
- goto ber_sequence_try_again;
+ if (len==0) {
+ offset = eoffset;
+ } else {
+ offset = hoffset+count;
+ }
+ /* if it was optional and no bytes were eaten and it was */
+ /* supposed to (len<>0), just try again. */
+ if((len!=0)&&(count==0)&&(seq->flags&BER_FLAGS_OPTIONAL)){
+ goto ber_sequence_try_again;
}
}