Wireshark-dev: [Wireshark-dev] address_to_str_buf not checking available buffer length

From: Andrej Mikus <wireshark-dev@xxxxxxxx>
Date: Sat, 27 Jan 2007 00:49:46 +0100
Team,

In file to_str.c I notice function address_to_str_buf that takes buf_len
as argument, but does not use it for IPv4 and IPv6 addresses:

void
address_to_str_buf(const address *addr, gchar *buf, int buf_len)
{
  switch(addr->type){
  case AT_IPv4:
    ip_to_str_buf(addr->data, buf);
    break;
  case AT_IPv6:
    inet_ntop(AF_INET6, addr->data, buf, INET6_ADDRSTRLEN);
    break;

Out of curiosity, is there another mechanism in place to ensure that the
buffer is always big enough? I notice that some dissectors call this
function directly.

Thanks
Andrej