Skip to content

Fix computation of chunk height#2423

Merged
cary-ilm merged 6 commits into
AcademySoftwareFoundation:mainfrom
kdt3rd:fix_samples_and_lpc
May 18, 2026
Merged

Fix computation of chunk height#2423
cary-ilm merged 6 commits into
AcademySoftwareFoundation:mainfrom
kdt3rd:fix_samples_and_lpc

Conversation

@kdt3rd
Copy link
Copy Markdown
Contributor

@kdt3rd kdt3rd commented May 17, 2026

Depending on the starting line, the lines per chunk (compression), and the y_sampling, the existing compute height was broken.

Add a test case

Addresses https://issues.oss-fuzz.com/issues/508362159
Addresses https://issues.oss-fuzz.com/issues/507413960

kdt3rd added 3 commits May 18, 2026 01:56
Signed-off-by: Kimball Thurston <kdt3rd@gmail.com>
Signed-off-by: Kimball Thurston <kdt3rd@gmail.com>
When there are strange y_sampling, the number of lines per chunk was not
being computed correctly depending on how the start position lines up
with the sampling

Signed-off-by: Kimball Thurston <kdt3rd@gmail.com>
Comment thread src/test/OpenEXRCoreTest/read.cpp Outdated
Comment thread src/test/OpenEXRCoreTest/read.cpp Outdated
cary-ilm added 2 commits May 17, 2026 20:54
remove debugging printf

Signed-off-by: Cary Phillips <cary@ilm.com>
remove debugging printf

Signed-off-by: Cary Phillips <cary@ilm.com>
Copy link
Copy Markdown
Member

@cary-ilm cary-ilm left a comment

Choose a reason for hiding this comment

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

Thanks! I removed a couple printf's, they appear to just be debugging aids, so better to not clutter the logs permanently.

@kthurston
Copy link
Copy Markdown

ah, I was doing it at night time, but those versions of the validation functions should only print anything if it failed (as a debugging thing, yes), can probably further clean up if we don't want that... (that's why I called them _p)

@cary-ilm
Copy link
Copy Markdown
Member

Ah, ok, I thought they might clutter the logs. Anyway, looks good, thanks!

@cary-ilm cary-ilm merged commit 15fa71c into AcademySoftwareFoundation:main May 18, 2026
52 of 55 checks passed
cary-ilm added a commit that referenced this pull request May 21, 2026
* remove errant include

Signed-off-by: Kimball Thurston <kdt3rd@gmail.com>

* add test for combo of start line, lines per compression, y samples

Signed-off-by: Kimball Thurston <kdt3rd@gmail.com>

* fix compute of sampled height

When there are strange y_sampling, the number of lines per chunk was not
being computed correctly depending on how the start position lines up
with the sampling

Signed-off-by: Kimball Thurston <kdt3rd@gmail.com>

* Apply suggestion from @cary-ilm

remove debugging printf

Signed-off-by: Cary Phillips <cary@ilm.com>

* Apply suggestion from @cary-ilm

remove debugging printf

Signed-off-by: Cary Phillips <cary@ilm.com>

---------

Signed-off-by: Kimball Thurston <kdt3rd@gmail.com>
Signed-off-by: Cary Phillips <cary@ilm.com>
Co-authored-by: Cary Phillips <cary@ilm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants