Fix buffer overrun when HTML exceptions are used.