Skip to content

BUG: Fix handling of zero-length StreamObject#3485

Merged
stefan6419846 merged 2 commits intopy-pdf:mainfrom
Likend:continue-from-pr-3114
Oct 16, 2025
Merged

BUG: Fix handling of zero-length StreamObject#3485
stefan6419846 merged 2 commits intopy-pdf:mainfrom
Likend:continue-from-pr-3114

Conversation

@Likend
Copy link
Copy Markdown
Contributor

@Likend Likend commented Oct 1, 2025

Closes #3052

A solution to #3052 continue from pr #3114.

@codecov
Copy link
Copy Markdown

codecov bot commented Oct 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.09%. Comparing base (2b2eca2) to head (61b9653).
⚠️ Report is 80 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3485   +/-   ##
=======================================
  Coverage   97.09%   97.09%           
=======================================
  Files          56       56           
  Lines        9658     9658           
  Branches     1748     1748           
=======================================
  Hits         9377     9377           
  Misses        168      168           
  Partials      113      113           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Likend Likend changed the title BUG: Fix handling of zero-length streams in StreamObject BUG: Fix handling of zero-length StreamObject Oct 2, 2025
Copy link
Copy Markdown
Collaborator

@stefan6419846 stefan6419846 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for looking into this.

@stefan6419846 stefan6419846 merged commit 623a700 into py-pdf:main Oct 16, 2025
18 checks passed
stefan6419846 added a commit that referenced this pull request Oct 19, 2025
## What's new

### Bug Fixes (BUG)
- Fix handling of zero-length StreamObject (#3485) by @Likend

### Robustness (ROB)
- Deal with wrong size for incremental PDF files (#3495) by @stefan6419846
- Improve handling for malformed cross-reference tables (#3483) by @stefan6419846

### Developer Experience (DEV)
- Use released Python 3.14 by @stefan6419846
- Use Mapping instead of dict in type hint of update_page_form_field_values (#3490) by @stefan6419846

[Full Changelog](6.1.1...6.1.2)
OpenNingia pushed a commit to OpenNingia/pypdf that referenced this pull request Oct 23, 2025
Closes py-pdf#3052.

---------

Co-authored-by: stefan6419846 <96178532+stefan6419846@users.noreply.github.com>
OpenNingia pushed a commit to OpenNingia/pypdf that referenced this pull request Oct 23, 2025
## What's new

### Bug Fixes (BUG)
- Fix handling of zero-length StreamObject (py-pdf#3485) by @Likend

### Robustness (ROB)
- Deal with wrong size for incremental PDF files (py-pdf#3495) by @stefan6419846
- Improve handling for malformed cross-reference tables (py-pdf#3483) by @stefan6419846

### Developer Experience (DEV)
- Use released Python 3.14 by @stefan6419846
- Use Mapping instead of dict in type hint of update_page_form_field_values (py-pdf#3490) by @stefan6419846

[Full Changelog](py-pdf/pypdf@6.1.1...6.1.2)
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.

Length-0 streams are read incorrectly, which breaks some PDFs

2 participants