While porting software from a friend wich was developed under Linux, I stumbled upon an error: src/socket.c:236: warning: implicit declaration of function `strnlen'
Now my programming experience is nothing to brag about but I wonder why strnlen
is not a part of FreeBSD's libc. I think that the use of strlen() insted of
strnlen() could resault in buffer-overflow risks and my fellows (most of them
are more experienced in the art of programming say that bounds checking is
always good.)
I see one small, specialiezed use. That is in a structure were a string for max length doesn't get the terminator, this would prevent reading throught the rest of the data to find a null somewhere.
Jim
-- /"\ ASCII Ribbon Campaign . \ / - NO HTML/RTF in e-mail . X - NO Word docs in e-mail . / \ ----------------------------------------------------------------- [EMAIL PROTECTED] http://www.FreeBSD.org The Power to Serve [EMAIL PROTECTED] http://www.TheHousleys.net --------------------------------------------------------------------- It's always a long day, 86400 doesn't fit into a short.
smime.p7s
Description: S/MIME Cryptographic Signature

