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

Commit 6ee7414e authored by Akhilesh Sanikop's avatar Akhilesh Sanikop
Browse files

mediametrics_aidl_fuzzer: Add signal() to handle SIGPIPE

Since media.metrics service handles SIGPIPE,
adding signal handler to avoid abort() due to
broken pipe.

Test: ./mediaextractor_service_fuzzer
Bug: 300081809

Change-Id: Id835ee4b48f09b2bae63d23486af748c09c4597c
parent 6413b8bf
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ using ::android::sp;
using ::android::MediaMetricsService;

extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
    signal(SIGPIPE, SIG_IGN);
    auto service = sp<MediaMetricsService>::make();
    fuzzService(service, FuzzedDataProvider(data, size));
    return 0;