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

[BUG] Crash when reading certain PSD files #4599

Open
jessey-git opened this issue Jan 17, 2025 · 0 comments · May be fixed by #4600
Open

[BUG] Crash when reading certain PSD files #4599

jessey-git opened this issue Jan 17, 2025 · 0 comments · May be fixed by #4600

Comments

@jessey-git
Copy link
Contributor

jessey-git commented Jan 17, 2025

Describe the bug

A crash occurs when reading certain PSD files. Looks like it's due to RLE encoding... PR incoming

OpenImageIO version and dependencies

Two versions were tested:

OIIO 2.5.11.0 | unknown arch?
    Build compiler: MSVS 1929 | C++14/199711
    HW features enabled at build: sse2

And

OIIO 3.1.0.0dev | unknown arch?
    Build compiler: MSVS 1943 | C++17/199711
    HW features enabled at build: sse2,sse3,ssse3,sse41,sse42,avx,avx2

To Reproduce

Steps to reproduce the behavior:

  1. Try reading the attached file using OIIO
  2. Crash inside PSDInput::read_native_scanline

Python repro

import OpenImageIO as oiio
inp = oiio.ImageInput.open("psd-test.psd")

spec = inp.spec()
nchannels = spec.nchannels
pixels = inp.read_image(0, 0, 0, nchannels, "float")  # does not matter if uint16 or uint8 is attempted either

psd-test.zip

jessey-git added a commit to jessey-git/OpenImageIO that referenced this issue Jan 17, 2025
jessey-git added a commit to jessey-git/OpenImageIO that referenced this issue Jan 17, 2025
…t buffer area for PSD RLE decoding

Signed-off-by: Jesse Yurkovich <[email protected]>
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 a pull request may close this issue.

1 participant