RawTherapee
RawTherapee copied to clipboard
Single tiled deflate compressed DNGs not decoded properly
Short description
I just tried opening a DNG using deflate compression with only one tile. If fails miserably since tile_length
is set to INT_MAX before reaching this if statement:
https://github.com/Beep6581/RawTherapee/blob/2ce5b827c5fa39b2b5425303f79f28b78f3df4f4/rtengine/dcraw.cc#L10906
Steps to reproduce
- Open the attached DNG (with the latest commit on dev)
- Notice how you only get an image containing zeros since (since
tile_offset
,tile_length
, andtile_width
are messed up)
This is were things get messed up: https://github.com/Beep6581/RawTherapee/blob/2ce5b827c5fa39b2b5425303f79f28b78f3df4f4/rtengine/dcraw.cc#L6551-L6554
Followed by: https://github.com/Beep6581/RawTherapee/blob/2ce5b827c5fa39b2b5425303f79f28b78f3df4f4/rtengine/dcraw.cc#L7065-L7066
Expected behavior
The attached image should be decoded properly.
Additional information Version: 5.8-3139-g2ce5b827c Branch: dev Commit: 2ce5b827c Commit date: 2022-08-30 Compiler: cc 10.2.1 Processor: x86_64 System: Linux Bit depth: 64 bits Gtkmm: V3.24.2 Lensfun: V0.3.2.0 Build type: release Build flags: -std=c++11 -march=native -Werror=unused-label -Werror=delete-incomplete -fno-math-errno -Wno-attributes -Wall -Wuninitialized -Wcast-qual -Wno-deprecated-declarations -Wno-unused-result -Wunused-macros -fopenmp -Werror=unknown-pragmas -O3 -DNDEBUG -ftree-vectorize Link flags: -march=native OpenMP support: ON MMAP support: ON Build OS: Linux 5.10.0-16-amd64 x86_64 Build date: Mon, 05 Sep 2022 09:39:15 +0000 UTC Build epoch: 1662370755 Build UUID: