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

Ensure that the empty dictionary won't be accidentally modified, and slightly improve the "SaveDocument" handler in src/core/worker.js #12375

Merged
merged 2 commits into from
Sep 15, 2020

Commits on Sep 15, 2020

  1. Ensure that the empty dictionary won't be accidentally modified

    Currently there's nothing that prevents modification of the `Dict.empty` primitive, which obviously needs to be *truly* empty to prevent any future (hard to find) bugs.
    Snuffleupagus committed Sep 15, 2020
    Configuration menu
    Copy the full SHA
    a531c98 View commit details
    Browse the repository at this point in the history
  2. A couple of small improvements in the "SaveDocument" handler in `src/…

    …core/worker.js`
    
     - Check that the "Info"-entry, in the XRef-trailer, is actually a dictionary before accessing it. This is similar to the `PDFDocument.documentInfo` method and follows the general principal of validating data carefully before accessing it, given how often PDF-software may create corrupt PDF files.
    
     - Slightly simplify the "XFA"-lookup, since there's no point in trying to fetch something from the empty dictionary.
    Snuffleupagus committed Sep 15, 2020
    Configuration menu
    Copy the full SHA
    ed4e7cd View commit details
    Browse the repository at this point in the history