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

Fix misc issues due to OSS-fuzz #1173

Merged
merged 6 commits into from
Oct 12, 2021

Conversation

kdt3rd
Copy link
Contributor

@kdt3rd kdt3rd commented Oct 5, 2021

Many errors were masked by the fix to properly interpret the channel list attribute size parameter. This attempts to fix those issues as a first pass

kdt3rd added 4 commits October 5, 2021 23:05
- Adds a (disabled) error handler print to make th test cases easier to
part
- Fixes an initialization of buffers to use the better half
- mark a couple of functions internal (static)

Signed-off-by: Kimball Thurston <[email protected]>
@kdt3rd kdt3rd marked this pull request as draft October 5, 2021 19:09
@kdt3rd kdt3rd marked this pull request as ready for review October 6, 2021 08:40
static void
core_error_handler_cb (exr_const_context_t f, int code, const char* msg)
{
#if 0
Copy link
Member

Choose a reason for hiding this comment

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

Dead code?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

well, yes and no. I should add a comment to this at the very least. Peter requested to silence the error prints to make the oss fuzz logs smaller and easier to parse, but then I also want the debug prints to know something has happened. Let me circle back with him and we can decide how to enable it. perhaps an env var instead of if 0 and re-compile.

Copy link
Contributor

@peterhillman peterhillman left a comment

Choose a reason for hiding this comment

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

LGTM

@cary-ilm cary-ilm merged commit b39b63a into AcademySoftwareFoundation:master Oct 12, 2021
cary-ilm pushed a commit to cary-ilm/openexr that referenced this pull request Oct 14, 2021
* Fix issues with fuzz test driver

- Adds a (disabled) error handler print to make th test cases easier to
part
- Fixes an initialization of buffers to use the better half
- mark a couple of functions internal (static)

Signed-off-by: Kimball Thurston <[email protected]>

* Add chunk for offsets in chunk table to be (somewhat validate)

Signed-off-by: Kimball Thurston <[email protected]>

* Clarify comment, simplify logic check

Signed-off-by: Kimball Thurston <[email protected]>

* Add check in mirror decode pipeline for alloc of 0 bytes

Signed-off-by: Kimball Thurston <[email protected]>

* Adjust logic so we can handle single scanline compression with image sampling

Signed-off-by: Kimball Thurston <[email protected]>

* switch to controlling prints for checking behind a getenv

Signed-off-by: Kimball Thurston <[email protected]>
cary-ilm pushed a commit that referenced this pull request Oct 24, 2021
* Fix issues with fuzz test driver

- Adds a (disabled) error handler print to make th test cases easier to
part
- Fixes an initialization of buffers to use the better half
- mark a couple of functions internal (static)

Signed-off-by: Kimball Thurston <[email protected]>

* Add chunk for offsets in chunk table to be (somewhat validate)

Signed-off-by: Kimball Thurston <[email protected]>

* Clarify comment, simplify logic check

Signed-off-by: Kimball Thurston <[email protected]>

* Add check in mirror decode pipeline for alloc of 0 bytes

Signed-off-by: Kimball Thurston <[email protected]>

* Adjust logic so we can handle single scanline compression with image sampling

Signed-off-by: Kimball Thurston <[email protected]>

* switch to controlling prints for checking behind a getenv

Signed-off-by: Kimball Thurston <[email protected]>
@kdt3rd kdt3rd deleted the fix_overrun_ossfuzz branch February 12, 2022 21:10
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