commit | 0522e004bd1750baa8ec2e5837fcfd8c85020d7a | [log] [tgz] |
---|---|---|
author | Josh Gao <jmgao@google.com> | Wed Jan 06 04:29:22 2021 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Wed Jan 06 04:29:22 2021 +0000 |
tree | fef0d91a4e3aed8dc8c6d73a65aa498602fc580e | |
parent | 459720d22ad8cdc491b21e288100df979669a47c [diff] | |
parent | 8e3f9dc03dc5262aabf3b01a17413ffb49af7b7f [diff] |
Merge "fix use-after-free in adbd_auth" am: 8e3f9dc03d Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1539159 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I3c9b324c2c3701aaf55c40df789625d5114efe50
diff --git a/libs/adbd_auth/adbd_auth.cpp b/libs/adbd_auth/adbd_auth.cpp index dae6eeb..15bd5c3 100644 --- a/libs/adbd_auth/adbd_auth.cpp +++ b/libs/adbd_auth/adbd_auth.cpp
@@ -282,9 +282,8 @@ LOG(FATAL) << "adbd_auth: unhandled packet type?"; } - output_queue_.pop_front(); - ssize_t rc = writev(framework_fd_.get(), iovs, iovcnt); + output_queue_.pop_front(); if (rc == -1 && errno != EAGAIN && errno != EWOULDBLOCK) { PLOG(ERROR) << "adbd_auth: failed to write to framework fd"; ReplaceFrameworkFd(unique_fd());