]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 3986: assertion failed due to incorrect error page buffer size
authorAmos Jeffries <squid3@treenet.co.nz>
Mon, 13 Jan 2014 21:03:45 +0000 (10:03 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Mon, 13 Jan 2014 21:03:45 +0000 (10:03 +1300)
errorpage.cc:1307:
   "(size_t)content->contentSize() == strlen(content->content())"

src/errorpage.cc

index ddf21942f103f6bf93d9dc626f12676ab2f9d433..8091c4a16280af84e49b75d839278851d4647023 100644 (file)
@@ -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;