Date: Fri, 21 Aug 1998 22:30:36 -0400 From: Matthew Hunt <mph@pobox.com> To: Phil Gilley <pgilley@metronet.com>, freebsd-hackers@FreeBSD.ORG Subject: Re: Stupidity or compiler bug? Message-ID: <19980821223036.A13406@astro.psu.edu> In-Reply-To: <Pine.HPP.3.95.980821204532.12165B-100000@fohnix.metronet.com>; from Phil Gilley on Fri, Aug 21, 1998 at 08:50:37PM -0500 References: <Pine.HPP.3.95.980821204532.12165B-100000@fohnix.metronet.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Aug 21, 1998 at 08:50:37PM -0500, Phil Gilley wrote:
> printf("%s %s\n", inet_ntoa(iph.ip_src), inet_ntoa(iph.ip_dst));
I haven't looked at the source, but this is an educated guess: You
cannot do that. inet_ntoa(3) presumably uses the same buffer to
store each result; if you want to keep multiple results, you need
to copy at least one into your own buffer.
--
Matthew Hunt <mph@pobox.com> * Inertia is a property of matter.
http://www.pobox.com/~mph/pgp.key for PGP public key 0x67203349.
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980821223036.A13406>
