diff --git a/interfaces/innerkits/native_cpp/test/fuzztest/dscreen_sink_proxy/proxysubscribelocalhardware_fuzzer/subscribelocalhardware_fuzzer.cpp b/interfaces/innerkits/native_cpp/test/fuzztest/dscreen_sink_proxy/proxysubscribelocalhardware_fuzzer/subscribelocalhardware_fuzzer.cpp index 8dac4383f07e21d4f5a6c32a560de86b1ace0da8..87d9c445baa73ec0d62cb5e2cdb9989e4f44f4a5 100644 --- a/interfaces/innerkits/native_cpp/test/fuzztest/dscreen_sink_proxy/proxysubscribelocalhardware_fuzzer/subscribelocalhardware_fuzzer.cpp +++ b/interfaces/innerkits/native_cpp/test/fuzztest/dscreen_sink_proxy/proxysubscribelocalhardware_fuzzer/subscribelocalhardware_fuzzer.cpp @@ -39,8 +39,8 @@ void SubscribeLocalHardwareFuzzTest(const uint8_t* data, size_t size) if (samgr == nullptr) { return; } - - sptr remoteObject = samgr->GetSystemAbility(DISTRIBUTED_HARDWARE_SCREEN_SINK_SA_ID); + int32_t saId = *(reinterpret_cast(data)); + sptr remoteObject = samgr->GetSystemAbility(saId); if (remoteObject == nullptr) { return; } diff --git a/interfaces/innerkits/native_cpp/test/fuzztest/dscreen_sink_proxy/sinkproxydscreennotify_fuzzer/sinkproxydscreennotify_fuzzer.cpp b/interfaces/innerkits/native_cpp/test/fuzztest/dscreen_sink_proxy/sinkproxydscreennotify_fuzzer/sinkproxydscreennotify_fuzzer.cpp index f33a9c7cdb21c9a07897f5d1e166493cfc656b2f..0d97564c6f085fc11646c8983d0489c5a5340666 100644 --- a/interfaces/innerkits/native_cpp/test/fuzztest/dscreen_sink_proxy/sinkproxydscreennotify_fuzzer/sinkproxydscreennotify_fuzzer.cpp +++ b/interfaces/innerkits/native_cpp/test/fuzztest/dscreen_sink_proxy/sinkproxydscreennotify_fuzzer/sinkproxydscreennotify_fuzzer.cpp @@ -40,8 +40,8 @@ void DScreenNotifyFuzzTest(const uint8_t* data, size_t size) if (samgr == nullptr) { return; } - - sptr remoteObject = samgr->GetSystemAbility(DISTRIBUTED_HARDWARE_SCREEN_SINK_SA_ID); + int32_t saId = *(reinterpret_cast(data)); + sptr remoteObject = samgr->GetSystemAbility(saId); if (remoteObject == nullptr) { return; } diff --git a/interfaces/innerkits/native_cpp/test/fuzztest/dscreen_source_proxy/proxyconfigdistributedhardware_fuzzer/configdistributedhardware_fuzzer.cpp b/interfaces/innerkits/native_cpp/test/fuzztest/dscreen_source_proxy/proxyconfigdistributedhardware_fuzzer/configdistributedhardware_fuzzer.cpp index a097bafb536bed7d8c8e645ce7ac596e6549cd44..f71fa60975971be07c2b74fff9840e22f0ce1f33 100644 --- a/interfaces/innerkits/native_cpp/test/fuzztest/dscreen_source_proxy/proxyconfigdistributedhardware_fuzzer/configdistributedhardware_fuzzer.cpp +++ b/interfaces/innerkits/native_cpp/test/fuzztest/dscreen_source_proxy/proxyconfigdistributedhardware_fuzzer/configdistributedhardware_fuzzer.cpp @@ -41,8 +41,8 @@ void ConfigDistributedHardwareFuzzTest(const uint8_t* data, size_t size) if (samgr == nullptr) { return; } - - sptr remoteObject = samgr->GetSystemAbility(DISTRIBUTED_HARDWARE_SCREEN_SOURCE_SA_ID); + int32_t saId = *(reinterpret_cast(data)); + sptr remoteObject = samgr->GetSystemAbility(saId); if (remoteObject == nullptr) { return; } diff --git a/interfaces/innerkits/native_cpp/test/fuzztest/dscreen_source_proxy/proxyregisterdistributedhardware_fuzzer/registerdistributedhardware_fuzzer.cpp b/interfaces/innerkits/native_cpp/test/fuzztest/dscreen_source_proxy/proxyregisterdistributedhardware_fuzzer/registerdistributedhardware_fuzzer.cpp index 82e40466627825d05b07cd7dd13ab85dc15824e0..ab96db45b9449e7e1d4e7faa1eb37b8fd0691dc6 100644 --- a/interfaces/innerkits/native_cpp/test/fuzztest/dscreen_source_proxy/proxyregisterdistributedhardware_fuzzer/registerdistributedhardware_fuzzer.cpp +++ b/interfaces/innerkits/native_cpp/test/fuzztest/dscreen_source_proxy/proxyregisterdistributedhardware_fuzzer/registerdistributedhardware_fuzzer.cpp @@ -46,8 +46,8 @@ void RegisterDistributedHardwareFuzzTest(const uint8_t* data, size_t size) if (samgr == nullptr) { return; } - - sptr remoteObject = samgr->GetSystemAbility(DISTRIBUTED_HARDWARE_SCREEN_SOURCE_SA_ID); + int32_t saId = *(reinterpret_cast(data)); + sptr remoteObject = samgr->GetSystemAbility(saId); if (remoteObject == nullptr) { return; } diff --git a/interfaces/innerkits/native_cpp/test/fuzztest/dscreen_source_proxy/proxyunregisterdistributedhardware_fuzzer/unregisterdistributedhardware_fuzzer.cpp b/interfaces/innerkits/native_cpp/test/fuzztest/dscreen_source_proxy/proxyunregisterdistributedhardware_fuzzer/unregisterdistributedhardware_fuzzer.cpp index 73357b41a01bc803c9e21068ac450dd235a42999..bc050c5fa43d9612b01b6154171546f4995f4013 100644 --- a/interfaces/innerkits/native_cpp/test/fuzztest/dscreen_source_proxy/proxyunregisterdistributedhardware_fuzzer/unregisterdistributedhardware_fuzzer.cpp +++ b/interfaces/innerkits/native_cpp/test/fuzztest/dscreen_source_proxy/proxyunregisterdistributedhardware_fuzzer/unregisterdistributedhardware_fuzzer.cpp @@ -41,8 +41,8 @@ void UnregisterDistributedHardwareFuzzTest(const uint8_t* data, size_t size) if (samgr == nullptr) { return; } - - sptr remoteObject = samgr->GetSystemAbility(DISTRIBUTED_HARDWARE_SCREEN_SOURCE_SA_ID); + int32_t saId = *(reinterpret_cast(data)); + sptr remoteObject = samgr->GetSystemAbility(saId); if (remoteObject == nullptr) { return; }