diff --git a/src/ncp/ncp_base.cpp b/src/ncp/ncp_base.cpp index 837a7557f..82240780b 100644 --- a/src/ncp/ncp_base.cpp +++ b/src/ncp/ncp_base.cpp @@ -2083,7 +2083,9 @@ exit: template <> otError NcpBase::HandlePropertyGet(void) { +#ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION assert(false); +#endif // We only get to this point if `assert(false)` // does not cause an NCP reset on the platform. @@ -2095,8 +2097,10 @@ template <> otError NcpBase::HandlePropertyGet(vo template <> otError NcpBase::HandlePropertyGet(void) { +#ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION while (true) ; +#endif OT_UNREACHABLE_CODE(return OT_ERROR_NONE;) }