mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
Fix an uninitialized variable bug, which was introduced by a careless
change while adding IPv6 support and would have the +port method of NSSocketPort randomly return invalid ports. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34343 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
6e1bdad49f
commit
eeae8f5780
2 changed files with 13 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
2011-12-22 Wolfgang Lux <wolgang.lux@gmail.com>
|
||||
|
||||
* Source/NSSocketPort.m (+portNumber:onHost:forceAddress:listener):
|
||||
Fix an uninitialized variable bug, which could lead to returning
|
||||
ports with an incorrect port number.
|
||||
|
||||
2011-12-19 Riccardo Mottola <rm@gnu.org>
|
||||
|
||||
* Source/GSString.m:
|
||||
|
|
|
@ -1595,7 +1595,13 @@ static Class tcpPortClass;
|
|||
* listener socket to accept incoming connections.
|
||||
*/
|
||||
addrOk = GSPrivateSockaddrSetup(addr, number, nil, nil, &sockaddr);
|
||||
if (NO == addrOk)
|
||||
|
||||
/*
|
||||
* Need size of buffer for getsockbyname() later.
|
||||
*/
|
||||
slen = sizeof(sockaddr);
|
||||
|
||||
if (addrOk == NO)
|
||||
{
|
||||
NSLog(@"Bad address (%@) specified for listening port", addr);
|
||||
DESTROY(port);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue