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
_______________________________________________
Wireshark-dev mailing list
[email protected]
http://www.wireshark.org/mailman/listinfo/wireshark-dev

Reply via email to