Closed Hombre57 closed 7 years ago
Hmmm, the thumbnail images seem to be ok, so why do I get this error message ?
@Hombre57 Works fine here with your file on Win7/64 master branch
@Hombre57 I recently (#3529) put some new code in to check for bad thumbnails to prevent OOB accesses. If the check fails, you'll see that warning. Maybe the check is a bit too strict. Feel free to relax it. :smiley:
Best Flössie
@Hombre57 I confirm the bug in master. In the post above I was misled by the fact that the tumbnail image is ok
@Floessie
diff --git a/rtengine/rtthumbnail.cc b/rtengine/rtthumbnail.cc
index 77e2609..af42ce8 100644
--- a/rtengine/rtthumbnail.cc
+++ b/rtengine/rtthumbnail.cc
@@ -55,7 +55,7 @@ namespace
? raw_image.get_thumbWidth() * raw_image.get_thumbHeight() * (raw_image.get_thumbBPS() / 8) * 3
: raw_image.get_thumbLength();
- return raw_image.get_thumbOffset() + length < raw_image.get_file()->size;
+ return raw_image.get_thumbOffset() + length <= raw_image.get_file()->size;
}
}
@heckflosse Right! :+1: I'll commit directly on master.
@Hombre57 Please report back and close this issue when you've tested.
@heckflosse Thanks for the fix. Better one byte too few than too much. :wink:
@Floessie I also tested. Works fine with the patch :+1:
Yep, works fine in master here too, thanks! I guess it will be the same when merged in gtk3-bugfix. Closing.
With RT4.2.1445 on win7/64, I clicked on a folder full of Pentax K-5 dng files, already edited with a previous RT version. While trying to rebuild the cache image data, RT prints an error message for each file :
Could not extract thumb from xxx
wherexxx
is the filename. However it display a thumbnail of the embedded jpeg file but can't switch to the edited version.Step to reproduce with gtk3-bugfix branch:
Sample DNG file: http://www.rawtherapee.com/shared/test_images/Chateau%20de%20Carcassonne.dng Chateau de Carcassonne.dng.pp3.zip