Ignore SIGPIPE in codec2 AIDL fuzzer
The service itself typically does this, so the fuzzer should too.
This was causing the fuzzer to exit in android::base::WriteStringToFd.
Test:
/data/fuzz/x86_64/libcodec2-aidl-fuzzer/vendor/libcodec2-aidl-fuzzer
Bug: 300195182
Change-Id: Ib43b02527a35698f90996d3b01a59f11f35d61f4
diff --git a/media/codec2/hal/aidl/fuzzer.cpp b/media/codec2/hal/aidl/fuzzer.cpp
index c1a2762..111ef26 100644
--- a/media/codec2/hal/aidl/fuzzer.cpp
+++ b/media/codec2/hal/aidl/fuzzer.cpp
@@ -29,6 +29,7 @@
std::shared_ptr<C2ComponentStore> store = ::android::GetCodec2PlatformComponentStore();
std::shared_ptr<ComponentStore> binder = SharedRefBase::make<ComponentStore>(store);
+ signal(SIGPIPE, SIG_IGN);
fuzzService(binder->asBinder().get(), FuzzedDataProvider(data, size));
return 0;