darktable-org / darktable-org/rawspeed
failure to process certain DNG files (Leica M246)
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 456
- Forks
- 147
- PR merge metrics
- No merged PRs in 30d
Description
Darktable/Rawspeed handle about 95% of the DNG files from a Leica M Monochrom (Typ 246) just fine, but fail on some of them. The failing files can be opened in RawTherapee, so this doesn't seem to be a matter of data corruption.
Using the rstest utility produces some output:
L1000625.DNG failed: /home/jeremy/dev/git/rawspeed/src/librawspeed/decompressors/AbstractDngDecompressor.cpp:224: void rawspeed::AbstractDngDecompressor::decompress() const: Too many errors encountered. Giving up. First Error:
/home/jeremy/dev/git/rawspeed/src/librawspeed/io/Buffer.h:173: const uint8_t* rawspeed::Buffer::getData(rawspeed::Buffer::size_type, rawspeed::Buffer::size_type) const: Buffer overflow: image file may be truncated
Total decoding time: 0s
If there are other diagnostics I can run, I'd be happy to do so. I can of course provide an offending DNG file as well (they tend to be on the order of 20 MB).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by obtaining one of the offending Leica M246 DNG files and reproducing the failure with the rstest utility. Trace the reported error through src/librawspeed/decompressors/AbstractDngDecompressor.cpp and src/librawspeed/io/Buffer.h, then identify the cause of the buffer overflow and add or update coverage so the affected file decodes successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100