Skip to content

fix(dicom): null-check DCMTK pixel-data accessors before use - #5364

Open
lgritz wants to merge 1 commit into
AcademySoftwareFoundation:mainfrom
lgritz:lg-dicom
Open

fix(dicom): null-check DCMTK pixel-data accessors before use#5364
lgritz wants to merge 1 commit into
AcademySoftwareFoundation:mainfrom
lgritz:lg-dicom

Conversation

@lgritz

@lgritz lgritz commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

DicomImage::getInterData() and getOutputData() can return null when a corrupt DICOM's frame fails to decode, but their results were used without checking.

Assisted-by: Claude Code / Claude Opus 4.8

DicomImage::getInterData() and getOutputData() can return null when a
corrupt DICOM's frame fails to decode, but their results were used
without checking: getInterData() is immediately dereferenced via
getData()/getRepresentation(), and getOutputData()'s pointer is stored
and later memcpy'd in read_native_scanline(). The only guard was an
OIIO_DASSERT, which compiles out in release builds, leaving a
null-pointer dereference on malformed input. Check both and error
cleanly.

Assisted-by: Claude Code / Claude Opus 4.8

Signed-off-by: Larry Gritz <lg@larrygritz.com>
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.

1 participant