-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add check for stored sizes in parsing #103
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #103 +/- ##
==========================================
+ Coverage 65.99% 66.01% +0.02%
==========================================
Files 85 85
Lines 10653 10664 +11
==========================================
+ Hits 7030 7040 +10
- Misses 3623 3624 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
What's still missing (aside from functional aspects):
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks
Description
Current Situation/Motivation:
When checking an image with subblocks with "StoredSize=37" for "H" dimension, CziCheck did pass without error.
As such documents are malformed, parsing should not succeed, at least not for strict parsing.
Change: libCzi checks the stored/pixel size when strict parsing is enabled.
Benefit:
Strict parsing can be enabled in CziCheck, then on parsing an exception is thrown and corrupted/illegal files will not pass CziCheck silently.
Fixes #102
Type of change
How Has This Been Tested?
New functionality checked with CziCmd and a file with size=37 in H-dimension.
Checklist: