OSDN Git Service
(root)
/
android-x86
/
bionic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3224c08
)
Convert cname lenght before use
author
Mattias Falk
<mattias.falk@sonyericsson.com>
Tue, 15 Feb 2011 07:44:20 +0000
(08:44 +0100)
committer
Brad Fitzpatrick
<bradfitz@android.com>
Tue, 1 Mar 2011 20:52:10 +0000
(12:52 -0800)
The length of the cname is sent in big-endian
order. Thus, it has to be converted before used
in android_getaddrinfo_proxy
Change-Id: I1a0cc12780c47f7493fcf06f690515829f88c01e
libc/netbsd/net/getaddrinfo.c
patch
|
blob
|
history
diff --git
a/libc/netbsd/net/getaddrinfo.c
b/libc/netbsd/net/getaddrinfo.c
index
bb6645c
..
edb4f70
100644
(file)
--- a/
libc/netbsd/net/getaddrinfo.c
+++ b/
libc/netbsd/net/getaddrinfo.c
@@
-541,6
+541,7
@@
android_getaddrinfo_proxy(
if (fread(&name_len, sizeof(name_len), 1, proxy) != 1) {
break;
}
+ name_len = ntohl(name_len);
if (name_len != 0) {
ai->ai_canonname = (char*) malloc(name_len);
if (fread(ai->ai_canonname, name_len, 1, proxy) != 1) {