aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-s1ap.c
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2008-11-29 21:21:54 +0000
committerAnders Broman <anders.broman@ericsson.com>2008-11-29 21:21:54 +0000
commitd5e1b41e429183fc4a3ec29926c85900018d5d0c (patch)
treeb8f29ba55f6fd8f49aa39f49dad957fa30158ebc /epan/dissectors/packet-s1ap.c
parent49ce0c4edf5ca4d80598c604bec718ac77276b3a (diff)
The tvb can be of size 0.
svn path=/trunk/; revision=26878
Diffstat (limited to 'epan/dissectors/packet-s1ap.c')
-rw-r--r--epan/dissectors/packet-s1ap.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/epan/dissectors/packet-s1ap.c b/epan/dissectors/packet-s1ap.c
index 1a2bc98f99..5b224a8e8d 100644
--- a/epan/dissectors/packet-s1ap.c
+++ b/epan/dissectors/packet-s1ap.c
@@ -1142,8 +1142,10 @@ dissect_s1ap_PLMNidentity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U
offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
3, 3, FALSE, &parameter_tvb);
-
- if (!parameter_tvb)
+ if(tvb_length(tvb)==0)
+ return offset;
+
+ if (!parameter_tvb)
return offset;
dissect_e212_mcc_mnc(parameter_tvb, tree, 0);
@@ -1669,7 +1671,7 @@ dissect_s1ap_ENB_UE_S1AP_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx
static int
dissect_s1ap_ENBname(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 173 "s1ap.cnf"
+#line 175 "s1ap.cnf"
tvbuff_t *parameter_tvb=NULL;
int length;
int p_offset;
@@ -2088,7 +2090,7 @@ dissect_s1ap_M_TMSI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, pro
static int
dissect_s1ap_NAS_PDU(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 199 "s1ap.cnf"
+#line 201 "s1ap.cnf"
tvbuff_t *parameter_tvb=NULL;