From owner-freebsd-audit Mon Nov 27 13:46:19 2000 Delivered-To: freebsd-audit@freebsd.org Received: from mail.utfors.se (mail.utfors.se [195.58.103.125]) by hub.freebsd.org (Postfix) with ESMTP id 91E2737B479 for ; Mon, 27 Nov 2000 13:46:12 -0800 (PST) Received: from ludd.luth.se (md4692557.utfors.se [212.105.37.87]) by mail.utfors.se (8.8.8/8.8.8) with ESMTP id WAA09200; Mon, 27 Nov 2000 22:45:16 +0100 (MET) Message-ID: <3A22D5DA.D5F4BAA7@ludd.luth.se> Date: Mon, 27 Nov 2000 22:44:58 +0100 From: Joachim =?iso-8859-1?Q?Str=F6mbergson?= Organization: Acne X-Mailer: Mozilla 4.75 [en] (X11; U; FreeBSD 4.2-STABLE i386) X-Accept-Language: en-US MIME-Version: 1.0 To: Kris Kennaway Cc: audit@FreeBSD.ORG Subject: Re: format_ip_addr() in libatm References: <20001126150832.A40399@citusc17.usc.edu> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Aloha! Kris Kennaway wrote: > > *sigh* Why is it so hard to understand that DNS addresses can be up to > 255 bytes long? > > Reviews please. > > Kris > > Index: ip_addr.c > =================================================================== > RCS file: /mnt/ncvs/src/lib/libatm/ip_addr.c,v > retrieving revision 1.3 > diff -u -r1.3 ip_addr.c > --- ip_addr.c 1999/08/27 23:58:04 1.3 > +++ ip_addr.c 2000/11/26 22:58:37 > @@ -124,7 +124,7 @@ > format_ip_addr(addr) > struct in_addr *addr; > { > - static char host_name[128]; > + static char host_name[MAXHOSTNAMELEN + 18]; > char *ip_num; > struct hostent *ip_host; I might be waaay off from what you are hinting at here but... Is this a patch by you that sets the size of host_name to MAXHOSTNAMELEN+18, or is this somebody elses patch that you consider bad? If it's the latter, then why the extra 18 bytes? Otherwise, I didn't see any probs... The disclaimer being my (in)ability to perfectly grasp C code. -- Cheers! Joachim - Alltid i harmonisk svängning --- FairLight ------ FairLight ------ FairLight ------ FairLight --- Joachim Strömbergson ASIC SoC designer, nice to CUTE animals Phone: +46(0)31 - 27 98 47 Web: http://www.ludd.luth.se/~watchman --------------- Spamfodder: regeringen@regeringen.se --------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message