rapid7/metasploit-framework — pull request #532 by wchen-r7 (2012-06-26 21:53:38+00:00)
Title: PDF Parser fix related to adobe_pdf_embedded_exe

This addresses 2 issues while using adobe_pdf_embedded_exe:

1) In some PDFs, the Size field may not exist. And that can trigger a undefined method `[]' for nil:NilClass bug. The exploit does NOT need this field to function.

2) In some PDFs, other fields (such as 'Info' during my test) also may not exist. This can cause a "KeyError key not found" error, which can be sort of confusing. To make this message more understandable, we catch this exception, and do a more user-friendly warning that the user-supplied PDF is not compatible.