-
Replaces repetitive key-check conditions with a reusable lambda function `want_key`, improving code readability and maintainability. Simplifies logic across multiple conditional sections in `QPDFJob.cc`.
-
Replaced `else if` chains with standalone `if` statements for clarity. Updated conditional checks with modern coding practices, such as using `.contains()` instead of `.count()`. These changes enhance code maintainability and ensure better style consistency.
-
Replace `count` method with iterator-based lookup to improve readability and reduce redundancy. Simplify conditional logic for determining the encryption filter, ensuring the default case remains clear.
-
Replaced manual key-value access with structured bindings in loops for better readability and modern C++ practices. Simplified error handling using `emplace_back` instead of `push_back`. Improved consistency and clarity in schema validation logic.
-
Simplified code by removing redundant `this` qualifiers where they are not essential, improving readability and alignment with coding standards. No changes were made to functionality.
-
qpdf permits replacing standard stream filters with user provided filters. #1457 incorrectly removed that option.
-
Introduced explicit checks for empty streams and refined filtering conditions for improved clarity and correctness.
-
Replaced `std::shared_ptr` with `std::unique_ptr` in `SF_FlateLzwDecode` to improve memory management and clarify ownership semantics. Adjusted related code and function logic to accommodate the change, including moving pipelines into the vector.
-
Updated `SF_Crypt` class methods and destructor to use the `final` specifier for clarity and stricter override rules. Refactored `setDecodeParms` logic for better readability and accurate handling of dictionary keys. Other minor adjustments contribute to code maintainability and correctness.
-
Removed `expand_filter_name` method and integrated its functionality directly into `filter_factory` for improved clarity and maintainability. Consolidated filter handling logic to eliminate redundant operations and streamline code execution.
-
Replaced individual compression flags with a unified decode-level parameter for stream filtering. Introduced a helper function to handle filtering conditions, reducing redundancy and improving readability. Removed unused code and updated related tests to reflect these changes.
-
Stream provider logic has been streamlined by removing unnecessary variables and conditional checks. Adjusted handling of mismatched or missing stream lengths to improve code readability and maintainability.
-
Replaced shared_ptr with unique_ptr for pipeline management, reducing overhead and improving ownership semantics. Simplified conditional checks and modernized code to enhance readability by removing redundant variables and adjusting pointer usages. This refactor ensures better maintainability and minor performance gains in stream processing.
-
Moved `anyBadTokens` and `lastTokenWasBad` methods to inline definitions within the header file for improved readability and maintainability. Also marked the class and relevant methods as `final` to prevent further inheritance and overrides.
-
Refactored the handling of /DecodeParms by removing unnecessary vector creation and directly accessing elements in the decode array. This improves code clarity and maintains consistency with filters processing.
-
Simplified and reorganized logic for handling /DecodeParms in streams. Ensured proper initialization and updated filter checks for lossy and specialized compression, improving code clarity and maintainability.
-
Moved the conditional check for /DecodeParms inconsistency into the loop to ensure clearer handling when filters are non-empty. This improves code structure and maintains robustness for edge cases encountered in the wild.
-
Simplified the logic for handling /DecodeParms by using `as_array` and modernized code with `auto` and `emplace_back`. This improves code readability and aligns with modern C++ practices.
-
Removed the unnecessary `filterable` variable and streamlined the logic for handling stream decoding parameters. These changes eliminate redundant checks, improve readability, and ensure clarity in flow control for filter processing.
-
Replaced manual array handling with cleaner iteration using `as_array`. This improves code readability and ensures more robust processing of stream filter arrays.
-
Simplify and reorganize parsing logic to replace explicit filter name collection with direct filter creation. Added validation for unsupported filters, ensuring filters are cleared and errors returned when necessary. This improves code clarity and robustness.
-
Moved stream filter factory logic into `Members::filter_factory` for better encapsulation and maintainability. Removed redundant static filter factory map and improved error handling for invalid stream filter configurations.
-
Moved `expand_filter_name` calls to maintain uniformity and avoid redundant processing in filter handling. This ensures cleaner and more structured code without changing functionality.
-
Moved the filter abbreviation expansion logic from a static map to a new `expand_filter_name` method in `QPDF_Stream::Members`. This simplifies the code, improves maintainability, and consolidates the logic for easier testing and updates.
-
When validating the pages tree after xref recovery do not tree dictionaries as page objects if more than 2 of the following are true: - the dictionary is direct - the /Type entry is missing or is not /Page - the dictionary does not contain a valid /Parent entry - the dictionary does not contain or inherit a valid /MediaBox - the dictionary does not contain or inherit a /Resources dictionary Such dictionaries are very unlikely to be page objects and trying to process them may cause excessive run time and memory usage.
-
Refine xref table reconstruction
-
Fix QPDFFormFieldObjectHelper::getChoices (fixes #1433)
-
During xref table reconstruction ignore uncompressed object entries found in xref streams. The xref table gets populated with entries for the objects actually found in the file. The entries for uncompressed object in xref streams are redundant and potentially incorrect.
-
Return the display value if the choices entry is an array of strings rather than a single string. Test file is need-appearances.pdf modified to contain one array entry.
-
Do not copy duplicate pages during xref recovery.
-
Reject objects containing arrays or dictionaries with more than 5000 elements. We are by definition dealing with damaged files, and such objects are extremely likely to be invalid or malicious.
-
Fix android build issues (fixes #950)
-
Implement QPDFFormFieldObjectHelper::isChecked
-
API was defined, but .cc had no implementation. PDF 2.0 manual is surprisingly unclear as to on/off values, giving /Yes in an example and /Off in descriptive text as "not on".
-
In QPDF::getAllPagesInternal include the /Kids array in the visited set for loop detection. Fixes oss-fuzz issue 411312393
-
Adjusting for under/overflow by repeated incrementing/decrementing can cause excessive runtime with invalid BBox coordinates. Fixes oss-fuzz issue 409905355.