summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Steven Moreland <smoreland@google.com> 2022-03-16 00:38:19 +0000
committer Steven Moreland <smoreland@google.com> 2022-03-16 00:38:19 +0000
commit8a2607c4aa1519e68f2e99529d6f5036a5b2c5dc (patch)
treeeb1aaf861d6ecce1d1634edb8d0bd5265c5e46c2
parentc572d08c7bdb8f0afd9e8bfebe56b9b73b1d0477 (diff)
libbinder_random_parcel: hide fill parcel data
We have no external users of this function, and I'd generally recommend against using it (it doesn't test things in RPC mode currently, and it limits the branches that would be explored). Hiding it for now. Bug: 224646709 Test: run binder_parcel_fuzzer Change-Id: Iafb61b9e201861f2f87de2f99217294b0d532881
-rw-r--r--libs/binder/tests/parcel_fuzzer/include_random_parcel/fuzzbinder/random_parcel.h4
-rw-r--r--libs/binder/tests/parcel_fuzzer/random_parcel.cpp10
2 files changed, 5 insertions, 9 deletions
diff --git a/libs/binder/tests/parcel_fuzzer/include_random_parcel/fuzzbinder/random_parcel.h b/libs/binder/tests/parcel_fuzzer/include_random_parcel/fuzzbinder/random_parcel.h
index 749bf212e6..db35e39108 100644
--- a/libs/binder/tests/parcel_fuzzer/include_random_parcel/fuzzbinder/random_parcel.h
+++ b/libs/binder/tests/parcel_fuzzer/include_random_parcel/fuzzbinder/random_parcel.h
@@ -24,8 +24,4 @@ namespace android {
* Fill parcel data, including some random binder objects and FDs
*/
void fillRandomParcel(Parcel* p, FuzzedDataProvider&& provider);
-/**
- * Fill parcel data, but don't fill any objects.
- */
-void fillRandomParcelData(Parcel* p, FuzzedDataProvider&& provider);
} // namespace android
diff --git a/libs/binder/tests/parcel_fuzzer/random_parcel.cpp b/libs/binder/tests/parcel_fuzzer/random_parcel.cpp
index 8bf04ccae0..89eadae981 100644
--- a/libs/binder/tests/parcel_fuzzer/random_parcel.cpp
+++ b/libs/binder/tests/parcel_fuzzer/random_parcel.cpp
@@ -34,6 +34,11 @@ private:
String16 mDescriptor;
};
+static void fillRandomParcelData(Parcel* p, FuzzedDataProvider&& provider) {
+ std::vector<uint8_t> data = provider.ConsumeBytes<uint8_t>(provider.remaining_bytes());
+ CHECK(OK == p->write(data.data(), data.size()));
+}
+
void fillRandomParcel(Parcel* p, FuzzedDataProvider&& provider) {
if (provider.ConsumeBool()) {
auto session = RpcSession::make(RpcTransportCtxFactoryRaw::make());
@@ -85,9 +90,4 @@ void fillRandomParcel(Parcel* p, FuzzedDataProvider&& provider) {
}
}
-void fillRandomParcelData(Parcel* p, FuzzedDataProvider&& provider) {
- std::vector<uint8_t> data = provider.ConsumeBytes<uint8_t>(provider.remaining_bytes());
- CHECK(OK == p->write(data.data(), data.size()));
-}
-
} // namespace android