{ 0x0C, "pragma" },
{ 0x0D, "referer" },
{ 0x0E, "user-agent" },
+ { 0, NULL}
};
{ 0x09, "Servlet-Engine" },
{ 0x0A, "Status" },
{ 0x0B, "WWW-Authenticate" },
+ { 0, NULL}
};
{ 5, "END RESPONSE" },
{ 6, "GET BODY CHUNK" },
{ 7, "SHUTDOWN" },
+ { 0, NULL }
};
{ 19, "CHECKOUT" },
{ 20, "UNCHECKOUT" },
{ 21, "SEARCH" },
+ { 0, NULL }
};
const gchar* msg_code = NULL;
int pos = 0;
guint8 mcode = 0;
- char mcode_buf[1024];
+ char *mcode_buf;
int i;
/* MAGIC
*/
mcode = tvb_get_guint8(tvb, pos);
msg_code = val_to_str(mcode, mtype_codes, "UNKNOWN");
- sprintf(mcode_buf, "(%d) %s", mcode, msg_code);
+ mcode_buf=ep_alloc(32);
+ g_snprintf(mcode_buf, 32, "(%d) %s", mcode, msg_code);
if (ajp13_tree)
proto_tree_add_string(ajp13_tree, hf_ajp13_code, tvb, pos, 1, mcode_buf);
pos+=1;
int dp = 0;
int cl = 0;
guint8 hname_bytes[1024];
- gchar hname_value[8*1024];
/* HEADER CODE/NAME
*/
pos+=hval_len+2;
dp = pos - orig_pos;
if (ajp13_tree) {
- sprintf(hname_value, "%s : %s", hname, hval);
+ gchar *hname_value;
+ hname_value=ep_alloc(512);
+ g_snprintf(hname_value, 512, "%s : %s", hname, hval);
proto_tree_add_string(ajp13_tree, hf_ajp13_hval, tvb, orig_pos, dp, hname_value);
}
}
cod = tvb_get_guint8(tvb, 4);
if (ajp13_tree) {
const gchar* msg_code = NULL;
- char mcode_buf[1024];
+ char *mcode_buf;
msg_code = val_to_str(cod, mtype_codes, "UNKNOWN");
- sprintf(mcode_buf, "(%d) %s", cod, msg_code);
+ mcode_buf=ep_alloc(32);
+ g_snprintf(mcode_buf, 32, "(%d) %s", cod, msg_code);
proto_tree_add_string(ajp13_tree, hf_ajp13_code, tvb, pos, 1, mcode_buf);
}
pos+=1;
meth = tvb_get_guint8(tvb, pos);
meth_code = val_to_str(meth, http_method_codes, "UNKNOWN");
if (ajp13_tree) {
- char mcode_buf[1024];
- sprintf(mcode_buf, "(%d) %s", meth, meth_code);
+ char *mcode_buf;
+ mcode_buf=ep_alloc(32);
+ g_snprintf(mcode_buf, 32, "(%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))
guint8 hcd;
guint8 hid;
- char hval[8192];
- guint16 hval_len;
int orig_pos = pos;
const gchar* hname = NULL;
int dp = 0;
int cl = 0;
- guint8 hname_bytes[1024];
+ char *hval;
+ guint16 hval_len;
/* HEADER CODE/NAME
*/
if (hid == 0x08)
cl = 1;
} else {
- int hname_len = get_nstring(tvb, pos, hname_bytes, sizeof hname_bytes);
+ guint8 *hname_bytes;
+ int hname_len;
+ hname_bytes=ep_alloc(1024);
+ hname_len = get_nstring(tvb, pos, hname_bytes, 1024);
pos+=hname_len+2;
- hname = (gchar*)hname_bytes; /* VERY EVIL */
+ hname = (gchar*)hname_bytes;
}
dp = pos-orig_pos;
/* HEADER VALUE
*/
orig_pos = pos;
- hval_len = get_nstring(tvb, pos, hval, sizeof hval);
+ hval=ep_alloc(8192);
+ hval_len = get_nstring(tvb, pos, hval, 8192);
pos+=hval_len+2;
dp = pos - orig_pos;