From: Amos Jeffries Date: Mon, 13 Jan 2014 21:03:45 +0000 (+1300) Subject: Bug 3986: assertion failed due to incorrect error page buffer size X-Git-Tag: SQUID_3_5_0_1~419 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=857e45128606c9429d7f771cf0322de512aa076a;p=thirdparty%2Fsquid.git Bug 3986: assertion failed due to incorrect error page buffer size errorpage.cc:1307: "(size_t)content->contentSize() == strlen(content->content())" --- diff --git a/src/errorpage.cc b/src/errorpage.cc index ddf21942f1..8091c4a162 100644 --- a/src/errorpage.cc +++ b/src/errorpage.cc @@ -1303,6 +1303,8 @@ MemBuf *ErrorState::ConvertText(const char *text, bool allowRecursion) if (*m) content->Printf("%s", m); /* copy tail */ + content->terminate(); + assert((size_t)content->contentSize() == strlen(content->content())); return content;