diff options
| author | 2023-07-27 16:53:29 +0000 | |
|---|---|---|
| committer | 2023-08-01 20:48:27 +0000 | |
| commit | ee6bf58e913545d2cb85156aad3a5b7b9ced72d7 (patch) | |
| tree | 2d0bd8fcb6e81226baa9d924066edcc1794f9c31 | |
| parent | adea715927393577ea95b1a31acf64e2e8e18aa9 (diff) | |
Read reserved bytes in fuzzService
Updating fuzzService to read the reserved bytes for future
needs. By reading reserved bytes already, we don't have
to change the fuzzer corpus if any additional branches
are introduced in fuzzService.
Test: m libbinder_random_parcel
Bug: 278975837
Change-Id: Ice0703e168b904ad959da0b41033e1056cdb6307
| -rw-r--r-- | libs/binder/tests/parcel_fuzzer/libbinder_driver.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/binder/tests/parcel_fuzzer/libbinder_driver.cpp b/libs/binder/tests/parcel_fuzzer/libbinder_driver.cpp index b268c5dcd4..47d2a0a701 100644 --- a/libs/binder/tests/parcel_fuzzer/libbinder_driver.cpp +++ b/libs/binder/tests/parcel_fuzzer/libbinder_driver.cpp @@ -35,6 +35,11 @@ void fuzzService(const std::vector<sp<IBinder>>& binders, FuzzedDataProvider&& p .extraFds = {}, }; + // Reserved bytes so that we don't have to change fuzzers and seed corpus if + // we introduce anything new in fuzzService. + std::vector<uint8_t> reservedBytes = provider.ConsumeBytes<uint8_t>(8); + (void)reservedBytes; + // always refresh the calling identity, because we sometimes set it below, but also, // the code we're fuzzing might reset it IPCThreadState::self()->clearCallingIdentity(); |