Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email email@example.com
Re: Buffer overflow in "lpr"Wietse Venema (wietseWZV.WIN.TUE.NL)
Thu, 17 Jul 1997 12:39:08 -0400
- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: brushSEARCH.POL.PL: "msg00234.html"
- Previous message: Dave Kormann: "slight misinformation in CA-97.21"
- In reply to: der Mouse: "Re: Buffer overflow in "lpr""
der Mouse wrote: > > Try this on for size: strlcat(), [...] > > What _I_ most often want but don't have is strnlen(): > > size_t strnlen(const char *str, size_t maxlen) > > Just like strlen(str), except that if no NUL is found in the > first maxlen bytes, returns maxlen without attempting to access > any further bytes. On ANSI-C compliant systems, memchr(str, 0, len) does almost the same (difference: the result is a pointer instead of a length). Wietse