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

Commit 27873608 authored by Andy Hung's avatar Andy Hung Committed by Automerger Merge Worker
Browse files

Merge "libmediautils_fuzzer_service_utilities : Resolve timeout" am:...

Merge "libmediautils_fuzzer_service_utilities : Resolve timeout" am: 001b8192 am: a1eac76f am: 23b8fe37

Original change: https://android-review.googlesource.com/c/platform/frameworks/av/+/2373708



Change-Id: Ic0c2c5db1dc59633cbfa45110403d0580d6d7069
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 80aebea8 23b8fe37
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@

static constexpr int kMaxOperations = 50;
static constexpr int kMaxStringLen = 256;
static constexpr int kMaxSpaces = 1000;

using android::content::AttributionSourceState;

@@ -35,7 +36,9 @@ const std::vector<std::function<void(FuzzedDataProvider*, android::MediaPackageM
            pm.allowPlaybackCapture(uid);
        },
        [](FuzzedDataProvider* data_provider, android::MediaPackageManager pm) -> void {
            int spaces = data_provider->ConsumeIntegral<int>();
           /* The large value of spaces was taking time in file write operation.
            * Limited spaces values in range to avoid timeout.*/
            int spaces = data_provider->ConsumeIntegralInRange<int>(0, kMaxSpaces);

            // Dump everything into /dev/null
            int fd = open("/dev/null", O_WRONLY);