This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/3355] strnlen() accesses memory locations beyond (s + maxlen)
- From: "kris dot van dot hees at oracle dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 12 Oct 2006 23:48:07 -0000
- Subject: [Bug libc/3355] strnlen() accesses memory locations beyond (s + maxlen)
- References: <20061012145036.3355.kris.van.hees@oracle.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From kris dot van dot hees at oracle dot com 2006-10-12 23:48 -------
If this is by design, I'll see check to log a bug against the manpage for
strnlen (at least on linux, haven't check manpage for other ports) because the
manpage currently explicitly states:
The strnlen function returns the number of characters in the string
pointed to by s, not including the terminating '\0' character, but at
most maxlen. In doing this, strnlen looks only at the first maxlen
characters at s and never beyond s+maxlen.
That last sentence is clearly not in sync with the implementation.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=3355
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.