aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2003-08-17 21:29:32 +0000
committerRaymond Hettinger <python@rcn.com>2003-08-17 21:29:32 +0000
commitfcc69f17185ff323672da8fb91f1f279c039c2ba (patch)
tree5736ca0910008a7cb3e113e20b61f9eb41de60db /Modules
parentAdjust some horizontal indentation to be consistent with the style used (diff)
downloadcpython-fcc69f17185ff323672da8fb91f1f279c039c2ba.tar.gz
cpython-fcc69f17185ff323672da8fb91f1f279c039c2ba.tar.bz2
cpython-fcc69f17185ff323672da8fb91f1f279c039c2ba.zip
SF #784031: Byte-order bug in socket-module getaddrinfo.c
Diffstat (limited to 'Modules')
-rw-r--r--Modules/getaddrinfo.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/getaddrinfo.c b/Modules/getaddrinfo.c
index dc6376fa2f3..4d19c342426 100644
--- a/Modules/getaddrinfo.c
+++ b/Modules/getaddrinfo.c
@@ -421,6 +421,7 @@ getaddrinfo(const char*hostname, const char*servname,
switch (gai_afdl[i].a_af) {
case AF_INET:
v4a = ((struct in_addr *)pton)->s_addr;
+ v4a = ntohl(v4a);
if (IN_MULTICAST(v4a) || IN_EXPERIMENTAL(v4a))
pai->ai_flags &= ~AI_CANONNAME;
v4a >>= IN_CLASSA_NSHIFT;