|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
Re: Buffer overflow in "lpr"
der Mouse (mouse
RODENTS.MONTREAL.QC.CA)Wed, 9 Jul 1997 11:56:16 -0400
- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Matt Barrie SYD: "FW: MS Access 'known database attack'"
- Previous message: Todd Vierling: "Re: Buffer overflow in "lpr""
- Maybe in reply to: a42n8k9: "Buffer overflow in "lpr""
- Next in thread: Wietse Venema: "Re: Buffer overflow in "lpr""
> 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.
The part after the last comma is the part I really miss. I hesitate to
call strlen() when I could wind up walking through megabytes of trash
before discovering a NUL, or worse, walking off the end of the address
space and segfaulting.
der Mouse
mouse
rodents.montreal.qc.ca
7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B
- Next message: Matt Barrie SYD: "FW: MS Access 'known database attack'"
- Previous message: Todd Vierling: "Re: Buffer overflow in "lpr""
- Maybe in reply to: a42n8k9: "Buffer overflow in "lpr""
- Next in thread: Wietse Venema: "Re: Buffer overflow in "lpr""