summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Moreland <smoreland@google.com>2019-05-20 14:56:05 -0700
committerNikoli Cartagena <dargeren@google.com>2019-06-10 15:55:29 -0700
commit5628025297a4a0905e2b5e95643daa6e2508adbd (patch)
treea98bd977824a928c278e779300957269420c5dfe
parent95ff7b1639b44a6ad9b63c68852e2a218c9471ae (diff)
downloadlibhidl-pie-security-release.tar.gz
libbinder Status has the exception type EX_HAS_REPLY_HEADER for fat Java-specific errors. This code jumps Parcel position to an arbitrary position in memory based on a value it reads from this parcel. Since this is unused in HIDL, removing entirely. Bug: 132650049 Test: HIDL's run_all_device_tests.sh Change-Id: Iac815f92c5da4ead283d3566892b5d4d209dab3b (cherry picked from commit 7fd5fbec0c4118203d37cfcc13d9451d3638c53d)
-rw-r--r--transport/HidlBinderSupport.cpp16
1 files changed, 0 insertions, 16 deletions
diff --git a/transport/HidlBinderSupport.cpp b/transport/HidlBinderSupport.cpp
index 4f8d7c5..ec23640 100644
--- a/transport/HidlBinderSupport.cpp
+++ b/transport/HidlBinderSupport.cpp
@@ -155,22 +155,6 @@ status_t readFromParcel(Status *s, const Parcel& parcel) {
return status;
}
- // Skip over fat response headers. Not used (or propagated) in native code.
- if (exception == Status::EX_HAS_REPLY_HEADER) {
- // Note that the header size includes the 4 byte size field.
- const int32_t header_start = parcel.dataPosition();
- int32_t header_size;
- status = parcel.readInt32(&header_size);
- if (status != OK) {
- s->setFromStatusT(status);
- return status;
- }
- parcel.setDataPosition(header_start + header_size);
- // And fat response headers are currently only used when there are no
- // exceptions, so act like there was no error.
- exception = Status::EX_NONE;
- }
-
if (exception == Status::EX_NONE) {
*s = Status::ok();
return status;