[prev in list] [next in list] [prev in thread] [next in thread] 

List:       libnet
Subject:    Re: Libnet 1.1.1-almostgold
From:       Jeff Nathan <jeff () snort ! org>
Date:       2003-10-21 20:03:28
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Yes,

including strlcat/strlcpy is a good solution.  Use AC_REPLACE_FUNCS in 
configure.in to check for strlcat/strlcpy and then wrap them both in:

#if !defined(HAVE_STRLCAT) || defined(WIN32)
/* ... foo ... */
#endif

(one for strlcpy too).

Make sure that strlcat and strlcpy aren't added to Makefile.am either, 
AC_REPLACE_FUNCS takes care of that automatically.

- -Jeff

On Friday, October 17, 2003, at 12:09 PM, Jose Nazario wrote:

> On Fri, 17 Oct 2003, [iso-8859-1] Frédéric Raynal wrote:
>
>> As snprintf() is not supported everywhere (!!!), there are still some
>> sprintf() in the libnet's code.
>
>> - fix a strncpy() "problem" in libnet_if_addr (dohhh ;-)
>> - fix most of strncpy() call to ensure that dst is null terminated
>
> may i suggest libnet import strlcat()/strlcpy() from openbsd as lots of
> other projects have done and one of the various free snprintf()
> implementations that is license compatable, as well.
>
> just one perspective...
>
> ___________________________
> jose nazario, ph.d.			jose@monkey.org
> 					http://monkey.org/~jose/
>

- --
http://cerberus.sourcefire.com/~jeff       (gpg/pgp key id 6923D3FD)
"Common sense is the collection of prejudices acquired by age
eighteen."   - Albert Einstein

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (Darwin)

iD8DBQE/lZEVEqr8+Gkj0/0RAvUOAJ40RSLmdG2FJo9Mt+n0dg1V6agY3ACgyGq9
9l3JXMl7wc7eEKDmusPJm+w=
=On6x
-----END PGP SIGNATURE-----


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic