diff options
author | Guy Harris <guy@alum.mit.edu> | 2016-08-02 20:28:41 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2016-08-03 03:29:51 +0000 |
commit | 6d8261994bb928b7e80e3a2478a3d939ea1ef373 (patch) | |
tree | 0f9a46cd98f4da037552a04c8ec633f84ffcb93a /epan/dissectors/packet-h225.c | |
parent | 64ec47e8261e3623d464cd69db12dcac0fa31332 (diff) |
Don't snprintf() into a string with one of the arguments being the same string.
That doesn't work - you could be writing into the string from which
you're reading.
Bug: 12700
Change-Id: I70f3ce6048dea582ec5e08c24c99e9a553b352df
Reviewed-on: https://code.wireshark.org/review/16850
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors/packet-h225.c')
-rw-r--r-- | epan/dissectors/packet-h225.c | 184 |
1 files changed, 98 insertions, 86 deletions
diff --git a/epan/dissectors/packet-h225.c b/epan/dissectors/packet-h225.c index cbc74f250a..c91d5491e7 100644 --- a/epan/dissectors/packet-h225.c +++ b/epan/dissectors/packet-h225.c @@ -1299,7 +1299,7 @@ dissect_h225_ProtocolIdentifier(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *a static int dissect_h225_T_h245Ip(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 339 "./asn1/h225/h225.cnf" +#line 341 "./asn1/h225/h225.cnf" tvbuff_t *value_tvb; ipv4_address = 0; @@ -1459,7 +1459,7 @@ dissect_h225_T_h245IpxAddress(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *act static int dissect_h225_T_h245Ip6(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 348 "./asn1/h225/h225.cnf" +#line 350 "./asn1/h225/h225.cnf" tvbuff_t *value_tvb; ipv6_address = ipv6_address_zeros; @@ -1567,7 +1567,7 @@ static const per_sequence_t H221NonStandard_sequence[] = { static int dissect_h225_H221NonStandard(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 790 "./asn1/h225/h225.cnf" +#line 802 "./asn1/h225/h225.cnf" t35CountryCode = 0; t35Extension = 0; manufacturerCode = 0; @@ -1575,7 +1575,7 @@ dissect_h225_H221NonStandard(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_h225_H221NonStandard, H221NonStandard_sequence); -#line 794 "./asn1/h225/h225.cnf" +#line 806 "./asn1/h225/h225.cnf" h221NonStandard = ((t35CountryCode * 256) + t35Extension) * 65536 + manufacturerCode; proto_tree_add_uint(tree, hf_h221Manufacturer, tvb, (offset>>3)-4, 4, h221NonStandard); @@ -1597,7 +1597,7 @@ static const per_choice_t NonStandardIdentifier_choice[] = { static int dissect_h225_NonStandardIdentifier(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 771 "./asn1/h225/h225.cnf" +#line 783 "./asn1/h225/h225.cnf" gint32 value; nsiOID = ""; @@ -1626,7 +1626,7 @@ dissect_h225_NonStandardIdentifier(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t static int dissect_h225_T_nsp_data(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 805 "./asn1/h225/h225.cnf" +#line 817 "./asn1/h225/h225.cnf" tvbuff_t *next_tvb = NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, @@ -1649,7 +1649,7 @@ static const per_sequence_t NonStandardParameter_sequence[] = { int dissect_h225_NonStandardParameter(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 803 "./asn1/h225/h225.cnf" +#line 815 "./asn1/h225/h225.cnf" nsp_handle = NULL; offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, @@ -1683,7 +1683,7 @@ static const per_choice_t H245TransportAddress_choice[] = { static int dissect_h225_H245TransportAddress(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 544 "./asn1/h225/h225.cnf" +#line 556 "./asn1/h225/h225.cnf" h225_packet_info* h225_pi; ipv4_address=0; ipv6_address = ipv6_address_zeros; @@ -1694,7 +1694,7 @@ dissect_h225_H245TransportAddress(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t ett_h225_H245TransportAddress, H245TransportAddress_choice, NULL); -#line 552 "./asn1/h225/h225.cnf" +#line 564 "./asn1/h225/h225.cnf" /* we need this info for TAPing */ h225_pi = (h225_packet_info*)p_get_proto_data(wmem_packet_scope(), actx->pinfo, proto_h225, 0); @@ -1729,7 +1729,7 @@ dissect_h225_H245TransportAddress(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t static int dissect_h225_DialedDigits(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 319 "./asn1/h225/h225.cnf" +#line 321 "./asn1/h225/h225.cnf" tvbuff_t *value_tvb = NULL; guint len = 0; h225_packet_info* h225_pi; @@ -2048,7 +2048,7 @@ dissect_h225_PartyNumber(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_ static int dissect_h225_TBCD_STRING(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 900 "./asn1/h225/h225.cnf" +#line 912 "./asn1/h225/h225.cnf" int min_len, max_len; gboolean has_extension; @@ -2847,13 +2847,13 @@ static const per_sequence_t TunnelledProtocol_sequence[] = { int dissect_h225_TunnelledProtocol(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 748 "./asn1/h225/h225.cnf" +#line 760 "./asn1/h225/h225.cnf" tpOID = ""; offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_h225_TunnelledProtocol, TunnelledProtocol_sequence); -#line 750 "./asn1/h225/h225.cnf" +#line 762 "./asn1/h225/h225.cnf" tp_handle = dissector_get_string_handle(tp_dissector_table, tpOID); return offset; @@ -3031,7 +3031,7 @@ dissect_h225_CallType(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, p static int dissect_h225_T_guid(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 712 "./asn1/h225/h225.cnf" +#line 724 "./asn1/h225/h225.cnf" tvbuff_t *guid_tvb = NULL; actx->value_ptr = &guid_tvb; @@ -3261,7 +3261,9 @@ dissect_h225_FastStart_item(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx /* Add to packet info */ h225_pi = (h225_packet_info*)p_get_proto_data(wmem_packet_scope(), actx->pinfo, proto_h225, 0); if (h225_pi != NULL) { - g_snprintf(h225_pi->frame_label, 50, "%s %s", h225_pi->frame_label, codec_str); + char temp[50]; + g_snprintf(temp, 50, "%s %s", h225_pi->frame_label, codec_str); + g_strlcpy(h225_pi->frame_label, temp, 50); h225_pi->is_faststart = TRUE; } contains_faststart = TRUE; @@ -3837,7 +3839,7 @@ dissect_h225_CircuitIdentifier(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *ac static int dissect_h225_T_standard(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 862 "./asn1/h225/h225.cnf" +#line 874 "./asn1/h225/h225.cnf" guint32 value_int = (guint32)-1; gef_ctx_t *gefx; @@ -3855,7 +3857,7 @@ dissect_h225_T_standard(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, static int dissect_h225_T_oid(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 871 "./asn1/h225/h225.cnf" +#line 883 "./asn1/h225/h225.cnf" const gchar *oid_str = NULL; gef_ctx_t *gefx; @@ -3885,7 +3887,7 @@ static const per_choice_t GenericIdentifier_choice[] = { int dissect_h225_GenericIdentifier(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 848 "./asn1/h225/h225.cnf" +#line 860 "./asn1/h225/h225.cnf" gef_ctx_t *gefx; proto_item* ti; @@ -3893,7 +3895,7 @@ dissect_h225_GenericIdentifier(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *ac ett_h225_GenericIdentifier, GenericIdentifier_choice, NULL); -#line 851 "./asn1/h225/h225.cnf" +#line 863 "./asn1/h225/h225.cnf" gef_ctx_update_key(gef_ctx_get(actx->private_data)); gefx = gef_ctx_get(actx->private_data); if (gefx) { @@ -3910,7 +3912,7 @@ dissect_h225_GenericIdentifier(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *ac static int dissect_h225_T_raw(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 881 "./asn1/h225/h225.cnf" +#line 893 "./asn1/h225/h225.cnf" tvbuff_t *value_tvb; gef_ctx_t *gefx; proto_item* ti; @@ -4028,7 +4030,7 @@ static const per_sequence_t EnumeratedParameter_sequence[] = { static int dissect_h225_EnumeratedParameter(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 830 "./asn1/h225/h225.cnf" +#line 842 "./asn1/h225/h225.cnf" gef_ctx_t *parent_gefx; parent_gefx = gef_ctx_get(actx->private_data); @@ -4037,7 +4039,7 @@ dissect_h225_EnumeratedParameter(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t * offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_h225_EnumeratedParameter, EnumeratedParameter_sequence); -#line 835 "./asn1/h225/h225.cnf" +#line 847 "./asn1/h225/h225.cnf" actx->private_data = parent_gefx; return offset; @@ -4052,7 +4054,7 @@ static const per_sequence_t GenericData_sequence[] = { int dissect_h225_GenericData(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 816 "./asn1/h225/h225.cnf" +#line 828 "./asn1/h225/h225.cnf" void *priv_data = actx->private_data; gef_ctx_t *gefx; @@ -4066,7 +4068,7 @@ dissect_h225_GenericData(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_ offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_h225_GenericData, GenericData_sequence); -#line 826 "./asn1/h225/h225.cnf" +#line 838 "./asn1/h225/h225.cnf" actx->private_data = priv_data; return offset; @@ -4105,13 +4107,13 @@ dissect_h225_CircuitInfo(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_ static int dissect_h225_FeatureDescriptor(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 840 "./asn1/h225/h225.cnf" +#line 852 "./asn1/h225/h225.cnf" void *priv_data = actx->private_data; actx->private_data = gef_ctx_alloc(NULL, "FeatureDescriptor"); offset = dissect_h225_GenericData(tvb, offset, actx, tree, hf_index); -#line 843 "./asn1/h225/h225.cnf" +#line 855 "./asn1/h225/h225.cnf" actx->private_data = priv_data; return offset; @@ -4134,7 +4136,7 @@ dissect_h225_SEQUENCE_OF_FeatureDescriptor(tvbuff_t *tvb _U_, int offset _U_, as static int dissect_h225_ParallelH245Control_item(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 361 "./asn1/h225/h225.cnf" +#line 363 "./asn1/h225/h225.cnf" tvbuff_t *h245_tvb = NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, @@ -4284,21 +4286,23 @@ static const per_sequence_t Setup_UUIE_sequence[] = { static int dissect_h225_Setup_UUIE(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 466 "./asn1/h225/h225.cnf" +#line 470 "./asn1/h225/h225.cnf" h225_packet_info* h225_pi; contains_faststart = FALSE; offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_h225_Setup_UUIE, Setup_UUIE_sequence); -#line 471 "./asn1/h225/h225.cnf" +#line 475 "./asn1/h225/h225.cnf" /* Add to packet info */ h225_pi = (h225_packet_info*)p_get_proto_data(wmem_packet_scope(), actx->pinfo, proto_h225, 0); if (h225_pi != NULL) { h225_pi->cs_type = H225_SETUP; - if (contains_faststart == TRUE ) - g_snprintf(h225_pi->frame_label, 50, "%s OLC (%s)", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>"), h225_pi->frame_label); - else + if (contains_faststart) { + char temp[50]; + g_snprintf(temp, 50, "%s OLC (%s)", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>"), h225_pi->frame_label); + g_strlcpy(h225_pi->frame_label, temp, 50); + } else g_snprintf(h225_pi->frame_label, 50, "%s", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>")); } @@ -4341,20 +4345,22 @@ static const per_sequence_t CallProceeding_UUIE_sequence[] = { static int dissect_h225_CallProceeding_UUIE(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 483 "./asn1/h225/h225.cnf" +#line 489 "./asn1/h225/h225.cnf" h225_packet_info* h225_pi; offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_h225_CallProceeding_UUIE, CallProceeding_UUIE_sequence); -#line 487 "./asn1/h225/h225.cnf" +#line 493 "./asn1/h225/h225.cnf" /* Add to packet info */ h225_pi = (h225_packet_info*)p_get_proto_data(wmem_packet_scope(), actx->pinfo, proto_h225, 0); if (h225_pi != NULL) { h225_pi->cs_type = H225_CALL_PROCEDING; - if (contains_faststart == TRUE ) - g_snprintf(h225_pi->frame_label, 50, "%s OLC (%s)", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>"), h225_pi->frame_label); - else + if (contains_faststart) { + char temp[50]; + g_snprintf(temp, 50, "%s OLC (%s)", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>"), h225_pi->frame_label); + g_strlcpy(h225_pi->frame_label, temp, 50); + } else g_snprintf(h225_pi->frame_label, 50, "%s", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>")); } @@ -4388,20 +4394,22 @@ static const per_sequence_t Connect_UUIE_sequence[] = { static int dissect_h225_Connect_UUIE(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 528 "./asn1/h225/h225.cnf" +#line 538 "./asn1/h225/h225.cnf" h225_packet_info* h225_pi; offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_h225_Connect_UUIE, Connect_UUIE_sequence); -#line 532 "./asn1/h225/h225.cnf" +#line 542 "./asn1/h225/h225.cnf" /* Add to packet info */ h225_pi = (h225_packet_info*)p_get_proto_data(wmem_packet_scope(), actx->pinfo, proto_h225, 0); if (h225_pi != NULL) { h225_pi->cs_type = H225_CONNECT; - if (contains_faststart == TRUE ) - g_snprintf(h225_pi->frame_label, 50, "%s OLC (%s)", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>"), h225_pi->frame_label); - else + if (contains_faststart) { + char temp[50]; + g_snprintf(temp, 50, "%s OLC (%s)", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>"), h225_pi->frame_label); + g_strlcpy(h225_pi->frame_label, temp, 50); + } else g_snprintf(h225_pi->frame_label, 50, "%s", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>")); } @@ -4433,20 +4441,22 @@ static const per_sequence_t Alerting_UUIE_sequence[] = { static int dissect_h225_Alerting_UUIE(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 499 "./asn1/h225/h225.cnf" +#line 507 "./asn1/h225/h225.cnf" h225_packet_info* h225_pi; offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_h225_Alerting_UUIE, Alerting_UUIE_sequence); -#line 503 "./asn1/h225/h225.cnf" +#line 511 "./asn1/h225/h225.cnf" /* Add to packet info */ h225_pi = (h225_packet_info*)p_get_proto_data(wmem_packet_scope(), actx->pinfo, proto_h225, 0); if (h225_pi != NULL) { h225_pi->cs_type = H225_ALERTING; - if (contains_faststart == TRUE ) - g_snprintf(h225_pi->frame_label, 50, "%s OLC (%s)", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>"), h225_pi->frame_label); - else + if (contains_faststart) { + char temp[50]; + g_snprintf(temp, 50, "%s OLC (%s)", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>"), h225_pi->frame_label); + g_strlcpy(h225_pi->frame_label, temp, 50); + } else g_snprintf(h225_pi->frame_label, 50, "%s", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>")); } @@ -4467,13 +4477,13 @@ static const per_sequence_t Information_UUIE_sequence[] = { static int dissect_h225_Information_UUIE(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 399 "./asn1/h225/h225.cnf" +#line 401 "./asn1/h225/h225.cnf" h225_packet_info* h225_pi; offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_h225_Information_UUIE, Information_UUIE_sequence); -#line 403 "./asn1/h225/h225.cnf" +#line 405 "./asn1/h225/h225.cnf" /* Add to packet info */ h225_pi = (h225_packet_info*)p_get_proto_data(wmem_packet_scope(), actx->pinfo, proto_h225, 0); if (h225_pi != NULL) { @@ -4595,7 +4605,7 @@ static const per_choice_t ReleaseCompleteReason_choice[] = { int dissect_h225_ReleaseCompleteReason(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 701 "./asn1/h225/h225.cnf" +#line 713 "./asn1/h225/h225.cnf" gint32 value; h225_packet_info* h225_pi; h225_pi = (h225_packet_info*)p_get_proto_data(wmem_packet_scope(), actx->pinfo, proto_h225, 0); @@ -4632,13 +4642,13 @@ static const per_sequence_t ReleaseComplete_UUIE_sequence[] = { static int dissect_h225_ReleaseComplete_UUIE(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 515 "./asn1/h225/h225.cnf" +#line 525 "./asn1/h225/h225.cnf" h225_packet_info* h225_pi; offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_h225_ReleaseComplete_UUIE, ReleaseComplete_UUIE_sequence); -#line 519 "./asn1/h225/h225.cnf" +#line 529 "./asn1/h225/h225.cnf" /* Add to packet info */ h225_pi = (h225_packet_info*)p_get_proto_data(wmem_packet_scope(), actx->pinfo, proto_h225, 0); if (h225_pi != NULL) { @@ -4682,7 +4692,7 @@ static const per_choice_t FacilityReason_choice[] = { static int dissect_h225_FacilityReason(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 581 "./asn1/h225/h225.cnf" +#line 593 "./asn1/h225/h225.cnf" gint32 value; h225_packet_info* h225_pi; h225_pi = (h225_packet_info*)p_get_proto_data(wmem_packet_scope(), actx->pinfo, proto_h225, 0); @@ -4756,13 +4766,13 @@ static const per_sequence_t Facility_UUIE_sequence[] = { static int dissect_h225_Facility_UUIE(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 441 "./asn1/h225/h225.cnf" +#line 445 "./asn1/h225/h225.cnf" h225_packet_info* h225_pi; offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_h225_Facility_UUIE, Facility_UUIE_sequence); -#line 445 "./asn1/h225/h225.cnf" +#line 449 "./asn1/h225/h225.cnf" /* Add to packet info */ h225_pi = (h225_packet_info*)p_get_proto_data(wmem_packet_scope(), actx->pinfo, proto_h225, 0); if (h225_pi != NULL) { @@ -4791,20 +4801,22 @@ static const per_sequence_t Progress_UUIE_sequence[] = { static int dissect_h225_Progress_UUIE(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 412 "./asn1/h225/h225.cnf" +#line 414 "./asn1/h225/h225.cnf" h225_packet_info* h225_pi; offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_h225_Progress_UUIE, Progress_UUIE_sequence); -#line 416 "./asn1/h225/h225.cnf" +#line 418 "./asn1/h225/h225.cnf" /* Add to packet info */ h225_pi = (h225_packet_info*)p_get_proto_data(wmem_packet_scope(), actx->pinfo, proto_h225, 0); if (h225_pi != NULL) { h225_pi->cs_type = H225_PROGRESS; - if (contains_faststart == TRUE ) - g_snprintf(h225_pi->frame_label, 50, "%s OLC (%s)", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>"), h225_pi->frame_label); - else + if (contains_faststart) { + char temp[50]; + g_snprintf(temp, 50, "%s OLC (%s)", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>"), h225_pi->frame_label); + g_strlcpy(h225_pi->frame_label, temp, 50); + } else g_snprintf(h225_pi->frame_label, 50, "%s", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>")); } @@ -4815,12 +4827,12 @@ dissect_h225_Progress_UUIE(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _ static int dissect_h225_T_empty_flg(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 375 "./asn1/h225/h225.cnf" +#line 377 "./asn1/h225/h225.cnf" h225_packet_info* h225_pi; offset = dissect_per_null(tvb, offset, actx, tree, hf_index); -#line 379 "./asn1/h225/h225.cnf" +#line 381 "./asn1/h225/h225.cnf" h225_pi = (h225_packet_info*)p_get_proto_data(wmem_packet_scope(), actx->pinfo, proto_h225, 0); if (h225_pi != NULL) { h225_pi->cs_type = H225_EMPTY; @@ -4840,13 +4852,13 @@ static const per_sequence_t Status_UUIE_sequence[] = { static int dissect_h225_Status_UUIE(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 386 "./asn1/h225/h225.cnf" +#line 388 "./asn1/h225/h225.cnf" h225_packet_info* h225_pi; offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_h225_Status_UUIE, Status_UUIE_sequence); -#line 390 "./asn1/h225/h225.cnf" +#line 392 "./asn1/h225/h225.cnf" /* Add to packet info */ h225_pi = (h225_packet_info*)p_get_proto_data(wmem_packet_scope(), actx->pinfo, proto_h225, 0); if (h225_pi != NULL) { @@ -4885,13 +4897,13 @@ static const per_sequence_t SetupAcknowledge_UUIE_sequence[] = { static int dissect_h225_SetupAcknowledge_UUIE(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 428 "./asn1/h225/h225.cnf" +#line 432 "./asn1/h225/h225.cnf" h225_packet_info* h225_pi; offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_h225_SetupAcknowledge_UUIE, SetupAcknowledge_UUIE_sequence); -#line 432 "./asn1/h225/h225.cnf" +#line 436 "./asn1/h225/h225.cnf" /* Add to packet info */ h225_pi = (h225_packet_info*)p_get_proto_data(wmem_packet_scope(), actx->pinfo, proto_h225, 0); if (h225_pi != NULL) { @@ -5002,7 +5014,7 @@ dissect_h225_T_h323_message_body(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t * static int dissect_h225_T_h4501SupplementaryService_item(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 736 "./asn1/h225/h225.cnf" +#line 748 "./asn1/h225/h225.cnf" tvbuff_t *h4501_tvb = NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, @@ -5033,14 +5045,14 @@ dissect_h225_T_h4501SupplementaryService(tvbuff_t *tvb _U_, int offset _U_, asn1 static int dissect_h225_T_h245Tunnelling(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 454 "./asn1/h225/h225.cnf" +#line 458 "./asn1/h225/h225.cnf" h225_packet_info* h225_pi; h225_pi = (h225_packet_info*)p_get_proto_data(wmem_packet_scope(), actx->pinfo, proto_h225, 0); if (h225_pi != NULL) { offset = dissect_per_boolean(tvb, offset, actx, tree, hf_index, &(h225_pi->is_h245Tunneling)); -#line 462 "./asn1/h225/h225.cnf" +#line 466 "./asn1/h225/h225.cnf" } return offset; @@ -5050,7 +5062,7 @@ dissect_h225_T_h245Tunnelling(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *act static int dissect_h225_H245Control_item(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 368 "./asn1/h225/h225.cnf" +#line 370 "./asn1/h225/h225.cnf" tvbuff_t *h245_tvb = NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, @@ -5107,7 +5119,7 @@ dissect_h225_CallLinkage(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_ static int dissect_h225_T_messageContent_item(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 758 "./asn1/h225/h225.cnf" +#line 770 "./asn1/h225/h225.cnf" tvbuff_t *next_tvb = NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, @@ -5143,7 +5155,7 @@ static const per_sequence_t T_tunnelledSignallingMessage_sequence[] = { static int dissect_h225_T_tunnelledSignallingMessage(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 756 "./asn1/h225/h225.cnf" +#line 768 "./asn1/h225/h225.cnf" tp_handle = NULL; offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, @@ -5446,7 +5458,7 @@ dissect_h225_SecurityErrors2(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx static int dissect_h225_RequestSeqNum(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 724 "./asn1/h225/h225.cnf" +#line 736 "./asn1/h225/h225.cnf" h225_packet_info* h225_pi; h225_pi = (h225_packet_info*)p_get_proto_data(wmem_packet_scope(), actx->pinfo, proto_h225, 0); if (h225_pi != NULL) { @@ -5454,7 +5466,7 @@ dissect_h225_RequestSeqNum(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _ offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 1U, 65535U, &(h225_pi->requestSeqNum), FALSE); -#line 732 "./asn1/h225/h225.cnf" +#line 744 "./asn1/h225/h225.cnf" } return offset; @@ -5999,7 +6011,7 @@ static const per_choice_t GatekeeperRejectReason_choice[] = { static int dissect_h225_GatekeeperRejectReason(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 592 "./asn1/h225/h225.cnf" +#line 604 "./asn1/h225/h225.cnf" gint32 value; h225_packet_info* h225_pi; h225_pi = (h225_packet_info*)p_get_proto_data(wmem_packet_scope(), actx->pinfo, proto_h225, 0); @@ -6305,7 +6317,7 @@ static const per_choice_t RegistrationRejectReason_choice[] = { static int dissect_h225_RegistrationRejectReason(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 679 "./asn1/h225/h225.cnf" +#line 691 "./asn1/h225/h225.cnf" gint32 value; h225_packet_info* h225_pi; h225_pi = (h225_packet_info*)p_get_proto_data(wmem_packet_scope(), actx->pinfo, proto_h225, 0); @@ -6372,7 +6384,7 @@ static const per_choice_t UnregRequestReason_choice[] = { static int dissect_h225_UnregRequestReason(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 603 "./asn1/h225/h225.cnf" +#line 615 "./asn1/h225/h225.cnf" gint32 value; h225_packet_info* h225_pi; h225_pi = (h225_packet_info*)p_get_proto_data(wmem_packet_scope(), actx->pinfo, proto_h225, 0); @@ -6461,7 +6473,7 @@ static const per_choice_t UnregRejectReason_choice[] = { static int dissect_h225_UnregRejectReason(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 614 "./asn1/h225/h225.cnf" +#line 626 "./asn1/h225/h225.cnf" gint32 value; h225_packet_info* h225_pi; h225_pi = (h225_packet_info*)p_get_proto_data(wmem_packet_scope(), actx->pinfo, proto_h225, 0); @@ -6525,7 +6537,7 @@ dissect_h225_CallModel(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, static int dissect_h225_DestinationInfo_item(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 310 "./asn1/h225/h225.cnf" +#line 312 "./asn1/h225/h225.cnf" h225_packet_info* h225_pi; h225_pi = (h225_packet_info*)p_get_proto_data(wmem_packet_scope(), actx->pinfo, proto_h225, 0); @@ -6737,7 +6749,7 @@ static const per_choice_t AdmissionRejectReason_choice[] = { static int dissect_h225_AdmissionRejectReason(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 657 "./asn1/h225/h225.cnf" +#line 669 "./asn1/h225/h225.cnf" gint32 value; h225_packet_info* h225_pi; h225_pi = (h225_packet_info*)p_get_proto_data(wmem_packet_scope(), actx->pinfo, proto_h225, 0); @@ -6873,7 +6885,7 @@ static const per_choice_t BandRejectReason_choice[] = { static int dissect_h225_BandRejectReason(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 625 "./asn1/h225/h225.cnf" +#line 637 "./asn1/h225/h225.cnf" gint32 value; h225_packet_info* h225_pi; h225_pi = (h225_packet_info*)p_get_proto_data(wmem_packet_scope(), actx->pinfo, proto_h225, 0); @@ -6929,7 +6941,7 @@ static const per_choice_t DisengageReason_choice[] = { static int dissect_h225_DisengageReason(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 636 "./asn1/h225/h225.cnf" +#line 648 "./asn1/h225/h225.cnf" gint32 value; h225_packet_info* h225_pi; h225_pi = (h225_packet_info*)p_get_proto_data(wmem_packet_scope(), actx->pinfo, proto_h225, 0); @@ -7020,7 +7032,7 @@ static const per_choice_t DisengageRejectReason_choice[] = { static int dissect_h225_DisengageRejectReason(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 646 "./asn1/h225/h225.cnf" +#line 658 "./asn1/h225/h225.cnf" gint32 value; h225_packet_info* h225_pi; h225_pi = (h225_packet_info*)p_get_proto_data(wmem_packet_scope(), actx->pinfo, proto_h225, 0); @@ -7170,7 +7182,7 @@ static const per_choice_t LocationRejectReason_choice[] = { static int dissect_h225_LocationRejectReason(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 668 "./asn1/h225/h225.cnf" +#line 680 "./asn1/h225/h225.cnf" gint32 value; h225_packet_info* h225_pi; h225_pi = (h225_packet_info*)p_get_proto_data(wmem_packet_scope(), actx->pinfo, proto_h225, 0); @@ -7545,7 +7557,7 @@ static const per_choice_t InfoRequestNakReason_choice[] = { static int dissect_h225_InfoRequestNakReason(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 690 "./asn1/h225/h225.cnf" +#line 702 "./asn1/h225/h225.cnf" gint32 value; h225_packet_info* h225_pi; h225_pi = (h225_packet_info*)p_get_proto_data(wmem_packet_scope(), actx->pinfo, proto_h225, 0); @@ -7760,7 +7772,7 @@ static const per_choice_t RasMessage_choice[] = { int dissect_h225_RasMessage(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 292 "./asn1/h225/h225.cnf" +#line 294 "./asn1/h225/h225.cnf" gint32 rasmessage_value; h225_packet_info* h225_pi; |