summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-03-18 21:31:07 +0100
committerHarald Welte <laforge@gnumonks.org>2018-03-18 22:37:34 +0100
commit96505f0fa01339ce5d721cc750bdf5480d6e3904 (patch)
tree3bbd44ad7c90b7c931383f9a761e58a169adc182
parentedbab816ba929020a5a6422096fd4cb8b106d4aa (diff)
BSSMAP_Emulation: handle zero-length L3 Info in f_bssap_l3_is_rr()
-rw-r--r--library/BSSMAP_Emulation.ttcn3
1 files changed, 3 insertions, 0 deletions
diff --git a/library/BSSMAP_Emulation.ttcn b/library/BSSMAP_Emulation.ttcn
index 5f8fe4f..2d9effc 100644
--- a/library/BSSMAP_Emulation.ttcn
+++ b/library/BSSMAP_Emulation.ttcn
@@ -464,6 +464,9 @@ private function f_bssap_l3_is_rr(PDU_BSSAP bssap) return boolean {
return false;
}
var octetstring l3v := valueof(l3);
+ if (lengthof(l3v) < 1) {
+ return false;
+ }
/* lower 4 bits of first octet are protocol discriminator */
if ((oct2bit(l3v[0]) and4b '00001111'B) == '00000110'B) {
return true;