Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always return a str from literal_name #978

Conversation

pietermarsman
Copy link
Member

@pietermarsman pietermarsman commented Jul 8, 2024

Pull request

This is what happened in practice for correct input (e.g. PSLiteral). But now it also always returns a str when the object is not a PSLiteral.

This fixes #977 because it makes the literal name object hashable. This sample PDF will now crash with a PDFSyntaxError. That's good.

How Has This Been Tested?

With the PDF from #977. And with nox.

Checklist

  • I have read CONTRIBUTING.md.
  • I have added a concise human-readable description of the change to CHANGELOG.md.
  • I have tested that this fix is effective or that this feature works.
  • I have added docstrings to newly created methods and classes.
  • I have updated the README.md and the readthedocs documentation. Or verified that this is not necessary.

… literal.

This fixes #977 because it makes the literal name object hashable. This sample PDF will now crash with a PDFSyntaxError. That's good.
@pietermarsman pietermarsman changed the title Always return a str from literal_name even if the object is not a… Always return a str from literal_name Jul 8, 2024
@pietermarsman pietermarsman added this pull request to the merge queue Jul 8, 2024
Merged via the queue into master with commit 8386822 Jul 8, 2024
12 checks passed
@pietermarsman pietermarsman deleted the 977-oss-fuzz-issue-70071-pdfminersixpage_extraction_fuzzer-uncaught-exception-in-do_keyword branch July 8, 2024 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OSS-Fuzz issue 70071: pdfminersix:page_extraction_fuzzer: Uncaught exception in do_keyword
1 participant