Fixed Fatal Error: Stack overflow - library/XenForo/Html/Renderer/BbCode.php

PaulB

Well-known member
ErrorException: Fatal Error: Stack overflow - library/XenForo/Html/Renderer/BbCode.php:389
Generated By: *****, Saturday at 7:21 AM

Stack Trace
#0 (): XenForo_Application::handleFatalError()
#1 {main}

Request State
https://gist.github.com/Zenexer/26a6810a84020e24d755 (Please respect the member's privacy and don't quote any of the text from this. Our members dislike it when their domain names are posted elsewhere.)

XenForo 1.4.6 + all security updates

Shouldn't there be a check in place to prevent a stack overflow from occurring, even with heavily nested HTML/BB code?
 
Last edited:
Stack overflows are very variable based on environmental conditions. You can likely change it on your system (ulimit -s). It's worth pointing out that this didn't trigger any issues on my initial test (in Windows).

That said, I have made changes to effectively limit HTML tags parsed to a depth a 100, which should be more than enough for all legitimate cases. Text beyond that limit will still be maintained.
 
Back
Top Bottom