Author: post
Date: 2010-11-22 20:12:11 +0100 (Mon, 22 Nov 2010)
New Revision: 304
Modified:
RawSpeed/TiffIFD.cpp
Log:
We don't parse original makernotes that are placed after 300MB mark in the
original file.
Modified: RawSpeed/TiffIFD.cpp
===================================================================
--- RawSpeed/TiffIFD.cpp 2010-11-22 18:50:12 UTC (rev 303)
+++ RawSpeed/TiffIFD.cpp 2010-11-22 19:12:11 UTC (rev 304)
@@ -130,6 +130,10 @@
org_offset = (unsigned int)data[0] << 24 | (unsigned int)data[1] << 16 |
(unsigned int)data[2] << 8 | (unsigned int)data[3];
data+=4;
+ /* We don't parse original makernotes that are placed after 300MB mark in
the original file */
+ if (org_offset+count > 300*1024*1024)
+ ThrowTPE("Adobe Private data: original offset of makernote is past 300MB
offset");
+
/* Create fake tiff with original offsets */
uchar8* maker_data = new uchar8[org_offset+count];
memcpy(&maker_data[org_offset],data, count);
_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit