On Wednesday November 11, chuck.lever-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org wrote:
On 2009-11-11 Fabio Olive Leite wrote:
quoted
On 2009-11-11 Patroklos Argyroudis wrote:
quoted
There is no need to increase the size of the buffer since the new
check (if (uaddr_len > sizeof(buf) - 2)) will terminate the function
in case the valid universal address is RPCBIND_MAXUADDRLEN bytes.
On a second note, why is '\n' needed there? You should only need
'\0', as a '\n'
quoted
at the end is not required by any of the string functions used to
convert the
address. I believe you could go with buf[RPCBIND_MAXUADDRLEN+1] for
the extra NUL only.
AFAICT, strict_strtoul() requires the '\n\0' termination.
if ((*tail == '\0') ||
((len == (size_t)(tail - cp) + 1) && (*tail == '\n'))) {
*res = val;
return 0;
}
allows, not requires. Though admittedly that code isn't as clear as
one might like:
if (tail[0] == 0 || (tail[0] == '\n' && tail[1] == 0) {
.....
}
NeilBrown
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html