Closed brunomlopes closed 2 years ago
We are upgrading to ServiceStack 6.1, and our testing has caught a stack overflow when converting from Dictionary<,> to IDictionary<,>
Dictionary<,>
IDictionary<,>
We added a test case on a gist here: https://gist.github.com/brunomlopes/521e0a5a05ad37eb9237542be7656ab2
The issue seems to be around here: https://github.com/ServiceStack/ServiceStack/blob/main/ServiceStack.Text/src/ServiceStack.Text/AutoMappingUtils.cs#L985-L992 , because it checks the target type, but the source instance.
The convert should succeed and not crash the application
Using servicestack 6.1.0 on net48
No response
Thanks for the repro, the type checks were failing because it didn't guard against null values, which is now fixed in this commit.
This change is available from the latest v6.1.1 that's now available on MyGet.
Describe the issue
We are upgrading to ServiceStack 6.1, and our testing has caught a stack overflow when converting from
Dictionary<,>
toIDictionary<,>
Reproduction
We added a test case on a gist here: https://gist.github.com/brunomlopes/521e0a5a05ad37eb9237542be7656ab2
The issue seems to be around here: https://github.com/ServiceStack/ServiceStack/blob/main/ServiceStack.Text/src/ServiceStack.Text/AutoMappingUtils.cs#L985-L992 , because it checks the target type, but the source instance.
Expected behavior
The convert should succeed and not crash the application
System Info
Additional context
No response
Validations