Details
-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
5.15.7, 6.4.2
-
None
-
-
888be431d (dev), 696fbf9fc (6.6)
Description
When generating PDF files using QPrinter and painting paths with large coordinates (but not NaN), the generated PDF is broken, with coordinates that look like 3209191894 421./,),(- l , which breaks the generated PDF (with unmatched parenthesis).
All versions I had access to are affected. The problem lies in insufficient validation of the qt_real_to_string function in src/gui/painting/qpdf.cpp.
Running the menu item in the attached program generates 10 PDF files, the last two of which (on my computer) are corrupted to the point that no PDF program can display them. Uncompressing reveals broken coordinates. I've attached one of the broken uncompressed ones.