Created attachment 7660 [details] testcase Bug 692287 introduced a clip stack in the list device which has a maximum of 96 entries which can be quite easily overflow into the heap (cf. testcase). @Robin: Style nit: Please open braces on the following lines, as everywhere else in MuPDF code. Thanks.
BTW: FZ_CMD_END_MASK also affects the clipping stack. As of bug 692287, too much is clipped out of a document, as soon as the first FZ_CMD_POP_CLIP belonging to an FZ_CMD_END_MASK is encountered. IOW: assert(list->top > 0) doesn't always hold for FZ_CMD_POP_CLIP , even though it really should.
FYI: Both issues are fixed in http://code.google.com/p/sumatrapdf/source/detail?r=4069