chiark / gitweb /
adnsresfilter: Fix addrtextbuf buffer size
[adns.git] / client / adnsresfilter.c
index dcf7011d7c6f483c696f21db2c0386331965c9e6..3e5255cac2b2302ca92a8ee34c7236a4b0cb7f64 100644 (file)
@@ -5,6 +5,7 @@
 /*
  *  This file is part of adns, which is
  *    Copyright (C) 1997-2000,2003,2006,2014  Ian Jackson
+ *    Copyright (C) 2014  Mark Wooding
  *    Copyright (C) 1999-2000,2003,2006  Tony Finch
  *    Copyright (C) 1991 Massachusetts Institute of Technology
  *  (See the file INSTALL for full details.)
@@ -66,7 +67,7 @@ static int peroutqueuenode, outqueuelen;
 static struct sockaddr_in sa;
 static adns_state ads;
 
-static char addrtextbuf[14];
+static char addrtextbuf[18]; /* [ddd.ddd.ddd.ddd] + nul */
 static int cbyte, inbyte, inbuf;
 static unsigned char bytes[4];
 static struct timeval printbefore;