Re: [BUG] Suspected bug in getpeername and getsockname

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux