Re: [BUG] Suspected bug in getpeername and getsockname

From: kuznet@ms2.inr.ac.ru
Date: Sat Jan 19 2002 - 13:32:10 EST


Hello!

> Depending on the length passed to me in getpeername,
> I fill in the correct members and return it back.

You introduce bug doing this. Length of user buffer is not
correlated with anything, actually new applications are supposed
to set it at least to sizeof(sockaddr_storage). What your protocol
will return?

posix requires to truncate address if the length is not enough.

Alexey
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html



This archive was generated by hypermail 2b29 : Wed Jan 23 2002 - 21:01:13 EST