Skip to content

Commit 12c5a16

Browse files
committed
Catch exceptions from non-canonical encoding and print only to log
1 parent 291f8aa commit 12c5a16

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/main.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5567,6 +5567,11 @@ bool ProcessMessages(CNode* pfrom)
55675567
// Allow exceptions from over-long size
55685568
LogPrintf("%s(%s, %u bytes): Exception '%s' caught\n", __func__, SanitizeString(strCommand), nMessageSize, e.what());
55695569
}
5570+
else if (strstr(e.what(), "non-canonical ReadCompactSize()"))
5571+
{
5572+
// Allow exceptions from non-canonical encoding
5573+
LogPrintf("%s(%s, %u bytes): Exception '%s' caught\n", __func__, SanitizeString(strCommand), nMessageSize, e.what());
5574+
}
55705575
else
55715576
{
55725577
PrintExceptionContinue(&e, "ProcessMessages()");

0 commit comments

Comments
 (0)