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

Commit 8ef956a6 authored by Akhilesh Sanikop's avatar Akhilesh Sanikop
Browse files

installd_service_fuzzer: Add signal() to handle SIGPIPE

Adding signal handler to avoid abort() due to
broken pipe.

Test: ./installd_service_fuzzer
Bug: 376201407
Change-Id: I4ae951c3cb900ffa7727d54b6083951aa69fc677
parent bd28005f
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -47,6 +47,8 @@ bool force_compile_without_image() {
} // namespace android

extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
    // TODO(b/183141167): need to rewrite 'dump' to avoid SIGPIPE.
    signal(SIGPIPE, SIG_IGN);
    auto service = sp<InstalldNativeService>::make();
    fuzzService(service, FuzzedDataProvider(data, size));
    return 0;