gethostbyname: fix crash
When an app doesn't have the internet permission, android_open_proxy returns NULL, causing a segfault when calling fprintf. Fixed. Change-Id: I598855350ed0db3cc88e5ae3b400145418a3a615
This commit is contained in:
parent
7dfc6a3cd1
commit
a6b24b7afb
@ -753,6 +753,7 @@ gethostbyname_internal(const char *name, int af, res_state res, const char *ifac
|
||||
}
|
||||
|
||||
proxy = android_open_proxy();
|
||||
if (proxy == NULL) goto exit;
|
||||
|
||||
/* This is writing to system/netd/DnsProxyListener.cpp and changes
|
||||
* here need to be matched there */
|
||||
|
Loading…
x
Reference in New Issue
Block a user