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 #3951: Invalid read from an empty vector during RLA load #3960

Merged
merged 2 commits into from
Aug 24, 2023

Conversation

jessey-git
Copy link
Contributor

Description

The incoming length of the RLE data could be 0. In this case we would attempt to take the address of the 1st element of an empty vector.

Tests

Added a new 1004-byte file to the local test suite.

Checklist:

  • I have read the contribution guidelines.
  • I have updated the documentation, if applicable.
  • I have ensured that the change is tested somewhere in the testsuite
    (adding new test cases if necessary).
  • If I added or modified a C++ API call, I have also amended the
    corresponding Python bindings (and if altering ImageBufAlgo functions, also
    exposed the new functionality as oiiotool options).
  • My code follows the prevailing code style of this project. If I haven't
    already run clang-format before submitting, I definitely will look at the CI
    test that runs clang-format and fix anything that it highlights as being
    nonconforming.

… during RLA load

Signed-off-by: Jesse Yurkovich <jesse.y@gmail.com>
Signed-off-by: Jesse Yurkovich <jesse.y@gmail.com>
Copy link
Collaborator

@lgritz lgritz left a comment

Choose a reason for hiding this comment

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

LGTM, good catch!

@lgritz
Copy link
Collaborator

lgritz commented Aug 24, 2023

Fixes #3951

@lgritz lgritz merged commit afe8159 into AcademySoftwareFoundation:master Aug 24, 2023
23 checks passed
lgritz pushed a commit to lgritz/OpenImageIO that referenced this pull request Aug 25, 2023
…oftwareFoundation#3960)

The incoming length of the RLE data could be 0. In this case we would
attempt to take the address of the 1st element of an empty vector.

Added a new 1004-byte file to the local test suite.

Fixes AcademySoftwareFoundation#3951

---------

Signed-off-by: Jesse Yurkovich <jesse.y@gmail.com>
@jessey-git jessey-git deleted the fix3951 branch September 26, 2023 02:54
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.

None yet

2 participants