Patch | Description | Author | Forwarded | Bugs | Origin | Last update |
---|---|---|---|---|---|---|
Prevent_infinite_loop_in_readObject.patch | [PATCH] Prevent infinite loop in readObject() function. Patch by dhudson1. Closes mstamy2/PyPDF2#184 | Henri Salo <henri.salo@nixu.com> | no | 2015-08-18 | ||
CVE-2022-24859.patch | CVE-2022-24859 | Markus Koschany <apo@debian.org> | no | debian | https://github.com/py-pdf/PyPDF2/pull/740 | 2022-06-03 |
0001-MAINT-Quadratic-runtime-while-parsing-reduced-to-lin.patch | MAINT: Quadratic runtime while parsing reduced to linear (#808) When the PdfFileReader tries to find the xref marker, the readNextEndLine methods builds a so called line by reading byte-for-byte. Every time a new byte is read, it is concatenated with the currently read line. This leads to quadratic runtime O(n) behavior as Python strings (also byte-strings) are immutable and have to be copied where n is the size of the file. For files where the xref marker can not be found at the end this takes a enormous amount of time: * 1mb of zeros at the end: 45.54 seconds * 2mb of zeros at the end: 357.04 seconds (measured on a laptop made in 2015) This pull request changes the relevant section of the code to become linear runtime O(n), leading to a run time of less then a second for both cases mentioned above. Furthermore this PR adds a regression test. |
dsk7 <jensg@posteo.de> | no | 2022-04-23 |