From ee5df5c99f3e42201472779d83135e12dfc462b4 Mon Sep 17 00:00:00 2001 From: mrbandrews Date: Thu, 2 Jun 2016 14:43:18 -0400 Subject: [PATCH] Catch exceptions from non-canonical encoding and print only to log --- src/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index ac420b82b..809693475 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -6342,6 +6342,11 @@ bool ProcessMessages(CNode* pfrom) // Allow exceptions from over-long size LogPrintf("%s(%s, %u bytes): Exception '%s' caught\n", __func__, SanitizeString(strCommand), nMessageSize, e.what()); } + else if (strstr(e.what(), "non-canonical ReadCompactSize()")) + { + // Allow exceptions from non-canonical encoding + LogPrintf("%s(%s, %u bytes): Exception '%s' caught\n", __func__, SanitizeString(strCommand), nMessageSize, e.what()); + } else { PrintExceptionContinue(&e, "ProcessMessages()");