Date: Mon, 27 Nov 2000 22:44:58 +0100 From: Joachim =?iso-8859-1?Q?Str=F6mbergson?= <watchman@ludd.luth.se> To: Kris Kennaway <kris@citusc.usc.edu> Cc: audit@FreeBSD.ORG Subject: Re: format_ip_addr() in libatm Message-ID: <3A22D5DA.D5F4BAA7@ludd.luth.se> References: <20001126150832.A40399@citusc17.usc.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3A22D5DA.D5F4BAA7>
