Bug 707842

Summary: limit error: too many nested graphics states
Product: MuPDF Reporter: eric.schoelzel
Component: mupdfAssignee: MuPDF bugs <mupdf-bugs>
Status: UNCONFIRMED ---    
Severity: major    
Priority: P2    
Version: 1.24.4   
Hardware: PC   
OS: Linux   
Customer: Word Size: ---

Description eric.schoelzel 2024-06-25 10:27:02 UTC
When trying to parse a certain pdf, we get `limit error: too many nested graphics states`. When trying `muraster`, we get a completely white output image.

It worked with an earlier version (it worked with pymupdf 1.22.1 which uses an older mupdf). I suspect that some kind of recursion limit has been introduced which we hit with that particular file.

Unfortunately, we cannot provide the original pdf as it is customer data. I tried to slice the pdf to obtain some insensitive sample file to reproduce it, however the bug disappeared when I tried this.

We originally reported this to pymupdf: https://github.com/pymupdf/PyMuPDF/issues/3608