Skip to content

Commit 456b495

Browse files
Merge remote-tracking branch 'origin/fix810_1.9' into fix808_v1.9
2 parents ac2af1f + cddaa9e commit 456b495

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/MessagePack/MessagePackSecurity.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ private MessagePackSecurity()
5656
/// </summary>
5757
/// <param name="copyFrom">The template to copy from.</param>
5858
protected MessagePackSecurity(MessagePackSecurity copyFrom)
59+
: this()
5960
{
6061
if (copyFrom is null)
6162
{

tests/MessagePack.Tests/MessagePackSecurityTests.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,13 @@ public void EqualityComparer_ObjectFallback()
141141
Assert.NotEqual(eq.GetHashCode(o), eq.GetHashCode(new object()));
142142
}
143143

144+
[Fact]
145+
public void EqualityComparer_ObjectFallback_AfterCopyCtor()
146+
{
147+
var security = MessagePackSecurity.UntrustedData.WithMaximumObjectGraphDepth(15);
148+
Assert.NotNull(security.GetEqualityComparer<object>());
149+
}
150+
144151
/// <summary>
145152
/// Verifies that arbitrary other types not known to be hash safe will be rejected.
146153
/// </summary>

0 commit comments

Comments
 (0)