Convert cname lenght before use
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
This commit is contained in:
parent
3224c08bd7
commit
0ee092fb23
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user