The tvb can be of size 0.
authoretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 29 Nov 2008 21:21:54 +0000 (21:21 +0000)
committeretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 29 Nov 2008 21:21:54 +0000 (21:21 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@26878 f5534014-38df-0310-8fa8-9805f1628bb7

asn1/s1ap/s1ap.cnf
epan/dissectors/packet-s1ap.c

index 283ea422abbe6926f7bcb2c8f40bd6bb1c40ca1d..ad74daeedfb68c6a045656bfb1dbadbc9b09ff6c 100644 (file)
@@ -163,8 +163,10 @@ MAX_VAL = asn1_param_get_integer(%(ACTX)s,"upperBound")
 
   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);
 #.END
index 1a2bc98f992218ab201ce8dffa0ca448abddc378..5b224a8e8d3a13809e8e0f961ad8e3401cb13ce0 100644 (file)
@@ -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;