From: wessels <> Date: Wed, 21 Aug 1996 11:59:20 +0000 (+0000) Subject: be smart about array bounds X-Git-Tag: SQUID_3_0_PRE1~5943 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ed83f7e9933bc27cf4a16e8ff1d55bc5ee4d53d8;p=thirdparty%2Fsquid.git be smart about array bounds --- diff --git a/src/fqdncache.cc b/src/fqdncache.cc index 100e095110..92cc84a8b6 100644 --- a/src/fqdncache.cc +++ b/src/fqdncache.cc @@ -1,6 +1,6 @@ /* - * $Id: fqdncache.cc,v 1.9 1996/08/21 05:48:02 wessels Exp $ + * $Id: fqdncache.cc,v 1.10 1996/08/21 05:59:20 wessels Exp $ * * DEBUG: section 35 FQDN Cache * AUTHOR: Harvest Derived @@ -1032,6 +1032,6 @@ char *fqdnFromAddr(addr) static char buf[32]; if ((n = fqdncache_gethostbyaddr(addr, 0))) return n; - strcpy(buf, inet_ntoa(addr)); + strncpy(buf, inet_ntoa(addr), 31); return buf; }