mfenniak / pyPdf

Pure-Python PDF Library; this repository is no longer maintained, please see https://github.com/knowah/PyPDF2/ insead.
https://github.com/knowah/PyPDF2/
Other
276 stars 85 forks source link

generic.NameObject causes infinite loops #18

Open rajeshdhawan opened 13 years ago

rajeshdhawan commented 13 years ago

I have a PDF document that seems to get stuck in an infinite loop in the "while True" clause of generic.NameObject.

I added the empty string "" to the tuple of NameObject.delimiterCharacters to fix this issue. Don't know if it's the right solution, but it seems to break the infinite loop perfectly.

rduplain commented 12 years ago

I can confirm this issue, and that the delimiter fix mentioned here works around the issue while passing my application tests. The greater issue is the use of while True: ... blocks throughout the code, instead of breaking after some limit with a raised exception.