diff options
author | Raymond Hettinger <python@rcn.com> | 2003-08-17 21:28:39 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2003-08-17 21:28:39 (GMT) |
commit | 3432118022284a6c4df58a07696fa8259bc0a1d9 (patch) | |
tree | d690614d5910f1ada77c34530607acf2d5844873 /Modules | |
parent | 6a1801271aa4011cf26e7a64b52f6be10997f267 (diff) | |
download | cpython-3432118022284a6c4df58a07696fa8259bc0a1d9.zip cpython-3432118022284a6c4df58a07696fa8259bc0a1d9.tar.gz cpython-3432118022284a6c4df58a07696fa8259bc0a1d9.tar.bz2 |
SF #784031: Byte-order bug in socket-module getaddrinfo.c
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/getaddrinfo.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/getaddrinfo.c b/Modules/getaddrinfo.c index dc6376f..4d19c34 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; |