adns/adns14-rh761513.patch
Adam Tkac 396642d55f adnsresfilter: fix segfault when --brackets option is used (#761513)
Signed-off-by: Adam Tkac <atkac@redhat.com>
2012-05-22 09:55:42 +02:00

13 lines
587 B
Diff

diff -up adns-1.4/client/adnsresfilter.c.rh761513 adns-1.4/client/adnsresfilter.c
--- adns-1.4/client/adnsresfilter.c.rh761513 2012-05-22 09:33:52.473128445 +0200
+++ adns-1.4/client/adnsresfilter.c 2012-05-22 09:34:18.279601665 +0200
@@ -68,7 +68,8 @@ static int peroutqueuenode, outqueuelen;
static struct sockaddr_in sa;
static adns_state ads;
-static char addrtextbuf[14];
+/* Size for worst case of "[255.255.255.255]" and leave room for null */
+static char addrtextbuf[18];
static int cbyte, inbyte, inbuf;
static unsigned char bytes[4];
static struct timeval printbefore;