Fix a few format string bugs found by Ilja van Sprundel.
svn path=/trunk/; revision=18677
This commit is contained in:
parent
1f4873db0b
commit
7976c442db
|
@ -12703,7 +12703,7 @@ dissect_ansi_param(ASN1_SCK *asn1, proto_tree *tree)
|
||||||
|
|
||||||
if (ansi_map_add_string[0] != '\0')
|
if (ansi_map_add_string[0] != '\0')
|
||||||
{
|
{
|
||||||
proto_item_append_text(item, ansi_map_add_string);
|
proto_item_append_text(item, "%s", ansi_map_add_string);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12766,7 +12766,7 @@ dissect_ansi_params(ASN1_SCK *asn1, proto_tree *tree)
|
||||||
|
|
||||||
if (ansi_map_add_string[0] != '\0')
|
if (ansi_map_add_string[0] != '\0')
|
||||||
{
|
{
|
||||||
proto_item_append_text(item, ansi_map_add_string);
|
proto_item_append_text(item, "%s", ansi_map_add_string);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -207,9 +207,9 @@ dissect_fw1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||||
if (tree) {
|
if (tree) {
|
||||||
if (!fw1_summary_in_tree)
|
if (!fw1_summary_in_tree)
|
||||||
/* Do not show the summary in Protocol Tree */
|
/* Do not show the summary in Protocol Tree */
|
||||||
ti = proto_tree_add_protocol_format(tree, proto_fw1, tvb, 0, ETH_HEADER_SIZE, fw1_header);
|
ti = proto_tree_add_protocol_format(tree, proto_fw1, tvb, 0, ETH_HEADER_SIZE, "%s", fw1_header);
|
||||||
else
|
else
|
||||||
ti = proto_tree_add_protocol_format(tree, proto_fw1, tvb, 0, ETH_HEADER_SIZE, header);
|
ti = proto_tree_add_protocol_format(tree, proto_fw1, tvb, 0, ETH_HEADER_SIZE, "%s", header);
|
||||||
|
|
||||||
/* create display subtree for the protocol */
|
/* create display subtree for the protocol */
|
||||||
fh_tree = proto_item_add_subtree(ti, ett_fw1);
|
fh_tree = proto_item_add_subtree(ti, ett_fw1);
|
||||||
|
|
|
@ -1561,7 +1561,7 @@ dissect_mq_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||||
{
|
{
|
||||||
guint8* sStructId;
|
guint8* sStructId;
|
||||||
sStructId = tvb_get_ephemeral_string(tvb, offset, 4);
|
sStructId = tvb_get_ephemeral_string(tvb, offset, 4);
|
||||||
ti = proto_tree_add_text(mqroot_tree, tvb, offset, 12, (const char*)sStructId);
|
ti = proto_tree_add_text(mqroot_tree, tvb, offset, 12, "%s", sStructId);
|
||||||
mq_tree = proto_item_add_subtree(ti, ett_mq_spi_base);
|
mq_tree = proto_item_add_subtree(ti, ett_mq_spi_base);
|
||||||
|
|
||||||
proto_tree_add_item(mq_tree, hf_mq_spi_base_structid, tvb, offset, 4, FALSE);
|
proto_tree_add_item(mq_tree, hf_mq_spi_base_structid, tvb, offset, 4, FALSE);
|
||||||
|
@ -1603,7 +1603,7 @@ dissect_mq_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||||
/* Dissect the common part of these structures */
|
/* Dissect the common part of these structures */
|
||||||
guint8* sStructId;
|
guint8* sStructId;
|
||||||
sStructId = tvb_get_ephemeral_string(tvb, offset, 4);
|
sStructId = tvb_get_ephemeral_string(tvb, offset, 4);
|
||||||
ti = proto_tree_add_text(mqroot_tree, tvb, offset, -1, "%s", (const char*)sStructId);
|
ti = proto_tree_add_text(mqroot_tree, tvb, offset, -1, "%s", sStructId);
|
||||||
mq_tree = proto_item_add_subtree(ti, ett_mq_spi_base);
|
mq_tree = proto_item_add_subtree(ti, ett_mq_spi_base);
|
||||||
|
|
||||||
proto_tree_add_item(mq_tree, hf_mq_spi_base_structid, tvb, offset, 4, FALSE);
|
proto_tree_add_item(mq_tree, hf_mq_spi_base_structid, tvb, offset, 4, FALSE);
|
||||||
|
|
|
@ -258,7 +258,7 @@ static void before_xmpli(void* tvbparse_data, const void* wanted_data _U_, tvbpa
|
||||||
|
|
||||||
pi = proto_tree_add_item(current_frame->tree,hf_tag,tok->tvb,tok->offset,tok->len,FALSE);
|
pi = proto_tree_add_item(current_frame->tree,hf_tag,tok->tvb,tok->offset,tok->len,FALSE);
|
||||||
|
|
||||||
proto_item_set_text(pi,tvb_format_text(tok->tvb,tok->offset,(name_tok->offset - tok->offset) + name_tok->len));
|
proto_item_set_text(pi, "%s", tvb_format_text(tok->tvb,tok->offset,(name_tok->offset - tok->offset) + name_tok->len));
|
||||||
|
|
||||||
pt = proto_item_add_subtree(pi,ett);
|
pt = proto_item_add_subtree(pi,ett);
|
||||||
|
|
||||||
|
@ -336,7 +336,7 @@ static void before_tag(void* tvbparse_data, const void* wanted_data _U_, tvbpars
|
||||||
}
|
}
|
||||||
|
|
||||||
pi = proto_tree_add_item(current_frame->tree,ns->hf_tag,tok->tvb,tok->offset,tok->len,FALSE);
|
pi = proto_tree_add_item(current_frame->tree,ns->hf_tag,tok->tvb,tok->offset,tok->len,FALSE);
|
||||||
proto_item_set_text(pi,tvb_format_text(tok->tvb,tok->offset,(name_tok->offset - tok->offset) + name_tok->len));
|
proto_item_set_text(pi, "%s", tvb_format_text(tok->tvb,tok->offset,(name_tok->offset - tok->offset) + name_tok->len));
|
||||||
|
|
||||||
pt = proto_item_add_subtree(pi,ns->ett);
|
pt = proto_item_add_subtree(pi,ns->ett);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue