Skip to content

[BUG] Invalid write crash when opening certain RAW images #3115

@AdamMainsTL

Description

@AdamMainsTL

Describe the bug
When opening some RAW images I get a hard crash in my application when opening them with raw:Demosaic = "none". Specifically the debugger says:

HEAP[prog.exe]: Heap block at 000002166E310F50 modified at 000002166E312908 past requested size of 19a8

Crash stack for reference:
image

To Reproduce
Steps to reproduce the behavior:

  1. Download image from evidence
  2. Open image
  3. Crash

Expected behavior
No crash please. Would expect it to throw an exception we can handle.

Evidence
Here is a direct link to the images which should be able to reproduce the crash. Just in case I'll also zip it and attach them here.

http://www.rawsamples.ch/raws/pentax/RAW_PENTAX_K5IIS.PEF
RAW_PENTAX_K5IIS.zip

http://www.rawsamples.ch/raws/nikon/d1x/RAW_NIKON_D1X.NEF
RAW_NIKON_D1X.zip

http://www.rawsamples.ch/raws/canon/40d/RAW_CANON_40D_SRAW_V103.CR2
RAW_CANON_40D_SRAW_V103.zip

http://www.rawsamples.ch/raws/kodak/RAW_KODAK_C330_FORMAT422_YRGB.RAW
RAW_KODAK_C330_FORMAT422_YRGB.zip

http://www.rawsamples.ch/raws/kodak/RAW_KODAK_C330_FORMAT420_YRGB.RAW
RAW_KODAK_C330_FORMAT420_YRGB.zip

http://www.rawsamples.ch/raws/kodak/RAW_KODAK_C330_FORMAT_NONE_YRGB.RAW
RAW_KODAK_C330_FORMAT_NONE_YRGB.zip

Platform information:

  • OIIO branch/version: 2.3.7.2
  • OS: Windows
  • C++ compiler: VS 2019
  • Any non-default build flags when you build OIIO: libraw, heic support

Metadata

Metadata

Assignees

No one assigned

    Labels

    file formatsImage file formats, ImageInput, ImageOutput

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions