aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-radius.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2007-01-29 20:25:26 +0000
committerGerald Combs <gerald@wireshark.org>2007-01-29 20:25:26 +0000
commit063621f11ba5c3c05514be94bd03865096b911b5 (patch)
tree97af587679fd749ac55b6ce95491d0c2260b5f7d /epan/dissectors/packet-radius.c
parent54f4d487f4e9425492298cf08099cf8fa4adcf9a (diff)
Fix potential buffer overruns in address_to_str_buf() found by Andrej
Mikus. Add a buf_len parameter to ip_to_str_buf(), and make sure it's enforced. Copy the release notes over from the 0.99.5 trunk and add a note about the ISUP dissector (which is affected by the overrun). svn path=/trunk/; revision=20607
Diffstat (limited to 'epan/dissectors/packet-radius.c')
-rw-r--r--epan/dissectors/packet-radius.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-radius.c b/epan/dissectors/packet-radius.c
index 116814adb2..6ce434e392 100644
--- a/epan/dissectors/packet-radius.c
+++ b/epan/dissectors/packet-radius.c
@@ -439,7 +439,7 @@ void radius_octets(radius_attr_info_t* a, proto_tree* tree, packet_info *pinfo _
void radius_ipaddr(radius_attr_info_t* a, proto_tree* tree, packet_info *pinfo _U_, tvbuff_t* tvb, int offset, int len, proto_item* avp_item) {
guint32 ip;
- gchar buf[16];
+ gchar buf[MAX_IP_STR_LEN];
if (len != 4) {
proto_item_append_text(avp_item, "[wrong length for IP address]");
@@ -450,7 +450,7 @@ void radius_ipaddr(radius_attr_info_t* a, proto_tree* tree, packet_info *pinfo _
proto_tree_add_item(tree, a->hf, tvb, offset, len, FALSE);
- ip_to_str_buf((guint8 *)&ip, buf);
+ ip_to_str_buf((guint8 *)&ip, buf, MAX_IP_STR_LEN);
proto_item_append_text(avp_item, "%s", buf);
}