aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-gsm_map.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2006-03-30 16:13:37 +0000
committerGerald Combs <gerald@wireshark.org>2006-03-30 16:13:37 +0000
commitf87b0f78ae476eb5444320a0fa986041d1571b62 (patch)
treefd053c378c6f836c3872edffd4e0263315e7e7f9 /epan/dissectors/packet-gsm_map.c
parent4ea62e57b067f96df69a313b1748a9ceb236687b (diff)
Fix an off-by-one error.
svn path=/trunk/; revision=17771
Diffstat (limited to 'epan/dissectors/packet-gsm_map.c')
-rw-r--r--epan/dissectors/packet-gsm_map.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/epan/dissectors/packet-gsm_map.c b/epan/dissectors/packet-gsm_map.c
index 6ccff94741..d0eb142468 100644
--- a/epan/dissectors/packet-gsm_map.c
+++ b/epan/dissectors/packet-gsm_map.c
@@ -1,6 +1,6 @@
/* Do not modify this file. */
/* It is created automatically by the ASN.1 to Ethereal dissector compiler */
-/* .\packet-gsm_map.c */
+/* ./packet-gsm_map.c */
/* ../../tools/asn2eth.py -X -b -e -p gsm_map -c gsmmap.cnf -s packet-gsm_map-template GSMMAP.asn */
/* Input file: packet-gsm_map-template.c */
@@ -2572,7 +2572,7 @@ static int dissect_diagnosticInfo(packet_info *pinfo, proto_tree *tree, tvbuff_t
static int
dissect_gsm_map_T_extType(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
-#line 446 "gsmmap.cnf"
+#line 447 "gsmmap.cnf"
proto_tree_add_text(tree, tvb, offset, -1, "Extension Data");
call_dissector(data_handle, tvb, pinfo, tree);
@@ -3074,7 +3074,7 @@ static int dissect_vlr_Capability_impl(packet_info *pinfo, proto_tree *tree, tvb
int
dissect_gsm_map_GSN_Address(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
-#line 524 "gsmmap.cnf"
+#line 525 "gsmmap.cnf"
tvbuff_t *parameter_tvb;
guint8 octet;
@@ -3470,7 +3470,7 @@ static int dissect_numberOfRequestedVectors(packet_info *pinfo, proto_tree *tree
int
dissect_gsm_map_LAIFixedLength(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
-#line 572 "gsmmap.cnf"
+#line 573 "gsmmap.cnf"
tvbuff_t *parameter_tvb;
proto_item *item;
@@ -5565,7 +5565,7 @@ static int
dissect_gsm_map_T_forwardingOptions(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
offset = dissect_gsm_map_Ext_ForwOptions(implicit_tag, tvb, offset, pinfo, tree, hf_index);
-#line 459 "gsmmap.cnf"
+#line 460 "gsmmap.cnf"
proto_tree_add_item(tree, hf_gsm_map_notification_to_forwarding_party, tvb, 0,1,FALSE);
proto_tree_add_item(tree, hf_gsm_map_redirecting_presentation, tvb, 0,1,FALSE);
@@ -6994,7 +6994,7 @@ static int dissect_pdp_ContextIdentifier_impl(packet_info *pinfo, proto_tree *tr
static int
dissect_gsm_map_PDP_Type(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
-#line 470 "gsmmap.cnf"
+#line 471 "gsmmap.cnf"
guint8 pdp_type_org;
tvbuff_t *parameter_tvb;
@@ -7043,7 +7043,7 @@ static int dissect_pdp_Address_impl(packet_info *pinfo, proto_tree *tree, tvbuff
int
dissect_gsm_map_QoS_Subscribed(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
-#line 496 "gsmmap.cnf"
+#line 497 "gsmmap.cnf"
tvbuff_t *parameter_tvb;
@@ -7089,7 +7089,7 @@ static int dissect_lcsAPN_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *t
int
dissect_gsm_map_Ext_QoS_Subscribed(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
-#line 510 "gsmmap.cnf"
+#line 511 "gsmmap.cnf"
tvbuff_t *parameter_tvb;
@@ -8319,7 +8319,7 @@ dissect_gsm_map_ForwardingOptions(gboolean implicit_tag _U_, tvbuff_t *tvb, int
offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index,
NULL);
-#line 453 "gsmmap.cnf"
+#line 454 "gsmmap.cnf"
proto_tree_add_item(tree, hf_gsm_map_notification_to_forwarding_party, tvb, 0,1,FALSE);
proto_tree_add_item(tree, hf_gsm_map_redirecting_presentation, tvb, 0,1,FALSE);
@@ -9201,7 +9201,7 @@ static int dissect_subscriberState(packet_info *pinfo, proto_tree *tree, tvbuff_
int
dissect_gsm_map_RAIdentity(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
-#line 554 "gsmmap.cnf"
+#line 555 "gsmmap.cnf"
tvbuff_t *parameter_tvb;
proto_item *item;
@@ -10578,6 +10578,7 @@ dissect_gsm_map_USSD_String(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset
guint8 octet;
guint8 length;
guint8 out_len;
+ /* XXX - The maximum item label length is 240. Does this really need to be 1024? */
static char bigbuf[1024];
octet = tvb_get_guint8(tvb,0);
@@ -10587,7 +10588,7 @@ dissect_gsm_map_USSD_String(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset
tvb_get_ptr(tvb, offset+2, length), bigbuf);
bigbuf[out_len] = '\0';
gsm_sms_char_ascii_decode(bigbuf, bigbuf, out_len);
- bigbuf[1024] = '\0';
+ bigbuf[1023] = '\0';
proto_tree_add_text(tree, tvb, offset+2, length, "USSD String: %s", bigbuf);