Commit 78e2b78ee1b71bf0b4a3790a72a8f76538980976 Parent e36d0b941a2cc5a9d74bf91733d3f094c4d60456 Author Nick Wellnhofer <wellnhofer@aevum.de> Date Mon, 24 Aug 2020 20:06:10 +0200 Avoid quadratic output growth with reference links Keep track of the number bytes added through expansion of reference links and limit the total to the size of the input document. Always allow a minimum of 100KB. Unfortunately, cmark has no error handling, so all we can do is to stop expanding reference links without returning an error. This should never be an issue in practice though. The 100KB minimum alone should cover all real-world cases. See issue #354.