Source: dnsmasq
Severity: minor
Tags: upstream ipv6

Dear Maintainer,

When dumping the dnsmasq cache by sending SIGUSR1 (with -q or -d set in 
options), the address portion of the cache is printed using %-30.30s at 
line 1457 of cache.c

30 characters is not enough for an IPv6 address - you need 39 characters 
in the maximal case. Actually it's 45 in the most pathological case of 
v6-encoded v4 addresses where the last 2 groups of 4 hex digits are 
replaced by a dotted-quad, but you can probably choose not to display 
addresses like that. The INET6_ADDRSTRLEN constant in <netinet/in.h> is 
46 for this reason.

I suggest that reducing the name portion from 40 to 30 (cache.c:1414) 
and increasing the address portion to 40 (line 1457) will suffice.

-- System Information:
Debian Release: jessie/sid
  APT prefers testing-updates
  APT policy: (500, 'testing-updates'), (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16.1 (SMP w/4 CPU cores; PREEMPT)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to