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

fix: fix the fix to #884 to fix #1025 #1030

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

dhdaines
Copy link
Contributor

@dhdaines dhdaines commented Aug 1, 2024

The fix in #885 was incorrect, because it caused tokens straddling a buffer boundary to be split in half, leading to #1025. This fixes #1025 (and also #885)

The code is somewhat fragile, particularly the EOF handling. It would make a lot more sense just to read the entire stream into memory and treat EOF as a valid end of token...

How Has This Been Tested?

A new unit test with the specific cmap stream mentioned in #1025

Checklist

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

@dhdaines
Copy link
Contributor Author

This is also fixed by #1041 which also improves speed and correctness, so feel free to close it.

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.

PSBaseParser can't handle tokens split across end of buffer
1 participant