Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2ce964b

Browse files
committed
Ensure getaddrinfo_all returns null result on failure.
1 parente295c55 commit2ce964b

File tree

1 file changed

+5
-2
lines changed
  • src/backend/libpq

1 file changed

+5
-2
lines changed

‎src/backend/libpq/ip.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/libpq/ip.c,v 1.24 2003/11/29 19:51:49 pgsql Exp $
11+
* $PostgreSQL: pgsql/src/backend/libpq/ip.c,v 1.25 2004/04/24 20:10:34 tgl Exp $
1212
*
1313
* This file and the IPV6 implementation were initially provided by
1414
* Nigel Kukard <nkukard@lbsd.net>, Linux Based Systems Design
@@ -67,8 +67,11 @@ static int getnameinfo_unix(const struct sockaddr_un * sa, int salen,
6767
*/
6868
int
6969
getaddrinfo_all(constchar*hostname,constchar*servname,
70-
conststructaddrinfo*hintp,structaddrinfo**result)
70+
conststructaddrinfo*hintp,structaddrinfo**result)
7171
{
72+
/* not all versions of getaddrinfo() zero *result on failure */
73+
*result=NULL;
74+
7275
#ifdefHAVE_UNIX_SOCKETS
7376
if (hintp!=NULL&&hintp->ai_family==AF_UNIX)
7477
returngetaddrinfo_unix(servname,hintp,result);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp