diff options
author | Gerald Combs <gerald@wireshark.org> | 2007-01-29 20:25:26 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2007-01-29 20:25:26 +0000 |
commit | 063621f11ba5c3c05514be94bd03865096b911b5 (patch) | |
tree | 97af587679fd749ac55b6ce95491d0c2260b5f7d /epan/ipv4.c | |
parent | 54f4d487f4e9425492298cf08099cf8fa4adcf9a (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/ipv4.c')
-rw-r--r-- | epan/ipv4.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/epan/ipv4.c b/epan/ipv4.c index 47e668dcbd..5fe49a0e7e 100644 --- a/epan/ipv4.c +++ b/epan/ipv4.c @@ -97,11 +97,12 @@ ipv4_get_host_order_addr(ipv4_addr *ipv4) return ipv4->addr; } +/* We're assuming the buffer is at least MAX_IP_STR_LEN (16 bytes) */ void ipv4_addr_str_buf(const ipv4_addr *ipv4, gchar *buf) { guint32 ipv4_host_order = g_htonl(ipv4->addr); - ip_to_str_buf((guint8*)&ipv4_host_order, buf); + ip_to_str_buf((guint8*)&ipv4_host_order, buf, MAX_IP_STR_LEN); } |