Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 19c2c8d

Browse files
committed
Merge pull request #498 from shift-evgeny/master
StackOverflowException when FromDbValue() is called with a value type that has no converter registered
2 parents c223df4 + 09724aa commit 19c2c8d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/ServiceStack.OrmLite.Tests/ConverterTests.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,18 @@ namespace ServiceStack.OrmLite.Tests
1010
[TestFixture]
1111
public class ConverterTests : OrmLiteTestBase
1212
{
13+
private struct TestStruct
14+
{
15+
}
16+
17+
[Test, Explicit]
18+
public void FromDbValue_StackOverflowException()
19+
{
20+
var dialectProvider = OrmLiteConfig.DialectProvider;
21+
var convertedValue = dialectProvider.FromDbValue(12345, typeof(TestStruct)); // StackOverflowException in v4.0.54
22+
Assert.That(convertedValue, Is.Null);
23+
}
24+
1325
[Test]
1426
public void Can_insert_update_and_select_AllTypes()
1527
{

0 commit comments

Comments
 (0)