Skip to content

Commit

Permalink
- synced with SVN
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke1410 committed Oct 17, 2017
1 parent 3adecdc commit 757c5b5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions Source/src/RakNetSocket2_Berkley_NativeClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ void DomainNameToIP_Berkley_IPV4And6( const char *domainName, char ip[65] )
hints.ai_socktype = SOCK_DGRAM;

if ((status = getaddrinfo(domainName, NULL, &hints, &res)) != 0) {
memset(ip, 0, 65); // sizeof(ip) returns pointer size, not array size
// #high - review/update callers - some unnecessarily initialize ip unnecessarily
ip[0] = '\0';
return;
}

Expand Down Expand Up @@ -82,7 +83,8 @@ void DomainNameToIP_Berkley_IPV4( const char *domainName, char ip[65] )
if ( error != 0 || addressinfo == 0 )
{
//cerr << "Yow! Bad host lookup." << endl;
memset(ip,0,65*sizeof(char));
// #high - review/update callers - some unnecessarily initialize ip unnecessarily
ip[0] = '\0';
return;
}

Expand Down
3 changes: 2 additions & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@ General:
* changed GitHub pullrequest markers to support pull requests from different GitHub forks (#105)
* dropped optional license requirement to notifiy "Mersenne Twister"-algorithm devs due to lack of valid contact information (#105)
* several small documentation updates (#105, #112 - SLNET_10)
* corrected text encoding throughout all files (#116)
Core:
RakNetSocket2:
* fixed certain error messages producing garbled output in unicode configurations (#119)
ReplicaManager3:
* fixed spelling mistake in ClientCreateible structs (#122 - SLNET_10)
* fixed spelling mistake in ClientCreateible structs (#122 - SLNET_15)
SocketLayer:
* fixed certain error messages producing garbled output in unicode configurations (#119)
Building:
Expand Down

0 comments on commit 757c5b5

Please sign in to comment.