mirror of
https://github.com/OPCFoundation/UA-.NETStandard.git
synced 2026-10-20 08:41:51 +08:00
e4f4629f48
## Failure The encoder fuzz host relied on NUnit or corpus-tool setup to assign `FuzzableCode.MessageContext`. Direct afl-fuzz/libFuzzer startup could therefore reach encoder targets without an initialized OPC UA message context. ## Fix - Initialize one process-lifetime `ServiceMessageContext` with null logging. - Make the context immutable and remove test/tool reassignment. - Exercise the same context from regression tests and the standalone fuzz host. ## Reference - OPC 10000-6 encoding validation. - Split from #4021. ## Tests - `dotnet test fuzzing\Opc.Ua.Encoders.Fuzz.Tests\Opc.Ua.Encoders.Fuzz.Tests.csproj -c Release -f net10.0 --nologo` (4,569 passed) - `dotnet run --project fuzzing\Opc.Ua.Encoders.Fuzz\Opc.Ua.Encoders.Fuzz.csproj -c Release --` (standalone smoke passed) --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>