Re: [BUG] Suspected bug in getpeername and getsockname

Date: Sat Jan 19 2002 - 13:32:10 EST


> 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.

To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to
More majordomo info at

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