Po Lu <luang...@yahoo.com> writes:

> Btw, doesn't this also mean that lib/strnlen.c (in Emacs, at least) is
> incorrect?
>
> size_t
> strnlen (const char *string, size_t maxlen)
> {
>   const char *end = memchr (string, '\0', maxlen);
>   return end ? (size_t) (end - string) : maxlen;
> }
>
> is virtually identical to Android's implementation and equally liable to
> overflow in memchr with excessive falues of MAXLEN.

Ping!

Reply via email to