/* Check a string doesn't overrun the chunk of memory we copied from userland.  */
static int invalid_str(char *str, void *end)
/* Check a string doesn't overrun the chunk of memory we copied from userland.  */
static int invalid_str(char *str, void *end)
{
	while ((void *) str < end)
		if (!*str++)
			return 0;
	return -EINVAL;
}