Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2f9a0e82 authored by Steven Moreland's avatar Steven Moreland Committed by Gerrit Code Review
Browse files

Merge "Restrict domain of transact codes in fuzzService"

parents 6f1de5c1 215468a1
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -37,7 +37,9 @@ void fuzzService(const sp<IBinder>& binder, FuzzedDataProvider&& provider) {
    }

    while (provider.remaining_bytes() > 0) {
        uint32_t code = provider.ConsumeIntegral<uint32_t>();
        // Most of the AIDL services will have small set of transaction codes.
        uint32_t code = provider.ConsumeBool() ? provider.ConsumeIntegral<uint32_t>()
                                               : provider.ConsumeIntegralInRange<uint32_t>(0, 100);
        uint32_t flags = provider.ConsumeIntegral<uint32_t>();
        Parcel data;
        // for increased fuzz coverage