OSDN Git Service
(root)
/
android-x86
/
system-netd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
69e82f1
)
DO NOT MERGE Fix use-after-free of mClient member DnsProxyListener::GetHostByNameHand...
author
Michal Karpinski
<mkarpinski@google.com>
Mon, 14 Nov 2016 09:29:03 +0000
(09:29 +0000)
committer
Michal Karpinski
<mkarpinski@google.com>
Fri, 2 Dec 2016 17:26:57 +0000
(17:26 +0000)
Found by ASan.
Test: Flash ASan build, boot up and verify that system/netd does not
crash with AddressSanitizer induced errors.
Bug:
32810214
Bug:
29748723
(cherry picked from commit
f8bb7ecc72e7a18ff5528613f79316634e8f6885
)
Change-Id: I8814756588b2bb4c78583a829e08d33305797642
server/DnsProxyListener.cpp
patch
|
blob
|
history
diff --git
a/server/DnsProxyListener.cpp
b/server/DnsProxyListener.cpp
index
861f9c1
..
aea5bdc
100644
(file)
--- a/
server/DnsProxyListener.cpp
+++ b/
server/DnsProxyListener.cpp
@@
-428,7
+428,6
@@
void DnsProxyListener::GetHostByNameHandler::run() {
if (!success) {
ALOGW("GetHostByNameHandler: Error writing DNS result to client\n");
}
- mClient->decRef();
if (mNetdEventListener != nullptr) {
std::vector<String16> ip_addrs;
@@
-467,6
+466,8
@@
void DnsProxyListener::GetHostByNameHandler::run() {
break;
}
}
+
+ mClient->decRef();
}