aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ajp13.c
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2009-10-25 11:43:30 +0000
committerAnders Broman <anders.broman@ericsson.com>2009-10-25 11:43:30 +0000
commit88bb44a51e350c9749323242482dc5e944697d8f (patch)
treea19835aec094d07536c6def639d5d5d236f0a1cd /epan/dissectors/packet-ajp13.c
parent337896f4c6777bc0b84a2e017ebcbb52100a312b (diff)
downloadwireshark-88bb44a51e350c9749323242482dc5e944697d8f.tar.gz
wireshark-88bb44a51e350c9749323242482dc5e944697d8f.tar.bz2
wireshark-88bb44a51e350c9749323242482dc5e944697d8f.zip
From Jakub Zawadzki:
Cleanup dissector code - use proper memory functions. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4164 svn path=/trunk/; revision=30691
Diffstat (limited to 'epan/dissectors/packet-ajp13.c')
-rw-r--r--epan/dissectors/packet-ajp13.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/epan/dissectors/packet-ajp13.c b/epan/dissectors/packet-ajp13.c
index 1c2d559dad..7069a5c950 100644
--- a/epan/dissectors/packet-ajp13.c
+++ b/epan/dissectors/packet-ajp13.c
@@ -291,8 +291,7 @@ display_rsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ajp13_tree)
*/
mcode = tvb_get_guint8(tvb, pos);
msg_code = val_to_str(mcode, mtype_codes, "UNKNOWN");
- mcode_buf=ep_alloc(32);
- g_snprintf(mcode_buf, 32, "(%d) %s", mcode, msg_code);
+ mcode_buf=ep_strdup_printf("(%d) %s", mcode, msg_code);
if (ajp13_tree)
proto_tree_add_string(ajp13_tree, hf_ajp13_code, tvb, pos, 1, mcode_buf);
pos+=1;
@@ -494,8 +493,7 @@ display_req_forward(tvbuff_t *tvb, packet_info *pinfo,
const gchar* msg_code = NULL;
char *mcode_buf;
msg_code = val_to_str(cod, mtype_codes, "UNKNOWN");
- mcode_buf=ep_alloc(32);
- g_snprintf(mcode_buf, 32, "(%d) %s", cod, msg_code);
+ mcode_buf=ep_strdup_printf("(%d) %s", cod, msg_code);
proto_tree_add_string(ajp13_tree, hf_ajp13_code, tvb, pos, 1, mcode_buf);
}
pos+=1;
@@ -512,8 +510,7 @@ display_req_forward(tvbuff_t *tvb, packet_info *pinfo,
meth_code = val_to_str(meth, http_method_codes, "UNKNOWN");
if (ajp13_tree) {
char *mcode_buf;
- mcode_buf=ep_alloc(32);
- g_snprintf(mcode_buf, 32, "(%d) %s", meth, meth_code);
+ mcode_buf=ep_strdup_printf("(%d) %s", meth, meth_code);
proto_tree_add_string(ajp13_tree, hf_ajp13_method, tvb, pos, 1, mcode_buf);
}
if(check_col(pinfo->cinfo, COL_INFO))