What happens:
http://www.stillhq.com/pdfdb/000590/data.pdf causes pdfsharp to loop infinitely until it runs out of memory.
Cause:
Because of
http://forum.pdfsharp.net/viewtopic.php?f=3&t=3410, pdfsharp fails to emit a closing parenthesis in a content stream. Then, the scanning for the end of the string results in an infinite loop.
Regardless of the previous bug, a missing end-of-string parenthesis should never result in an infinite loop.
Patch:
See attachment. Patch is against 1.50-beta3b. Note: I constructed the diff partially by hand, because CLexer.cs was inadvertently stored as UTF-16 in our local repository. I hope I made no mistakes.
The patch also fixes an error message.