Re: Off-by-one bug at unix_mkname ?

From: Chris Wedgwood
Date: Mon Mar 28 2005 - 03:51:45 EST


On Mon, Mar 28, 2005 at 05:39:38PM +0900, YOSHIFUJI Hideaki / ?$B5HF#1QL@ wrote:

> + /*
> + * This may look like an off by one error but it is
> + * a bit more subtle. 108 is the longest valid AF_UNIX
> + * path for a binding. sun_path[108] doesnt as such
> + * exist. However in kernel space we are guaranteed that
> + * it is a valid memory location in our kernel
> + * address buffer.

icky pointless white space?

> + */
> + if (len > sizeof(*sunaddr))

what?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/