Author: post
Date: 2010-12-04 16:52:26 +0100 (Sat, 04 Dec 2010)
New Revision: 312

Modified:
   RawSpeed/TiffEntry.h
   RawSpeed/TiffParser.cpp
   RawSpeed/TiffParserHeaderless.cpp
   RawSpeed/TiffParserOlympus.cpp
Log:
Differentiate size check error messages

Modified: RawSpeed/TiffEntry.h
===================================================================
--- RawSpeed/TiffEntry.h        2010-12-04 15:26:14 UTC (rev 311)
+++ RawSpeed/TiffEntry.h        2010-12-04 15:52:26 UTC (rev 312)
@@ -34,7 +34,7 @@
 #undef CHECKSIZE
 #endif
 
-#define CHECKSIZE(A) if (A >= f->getSize() || A < 1) throw 
TiffParserException("Error reading TIFF structure. File Corrupt")
+#define CHECKSIZE(A) if (A >= f->getSize() || A < 1) throw 
TiffParserException("Error reading TIFF Entry structure size. File Corrupt")
 
 // 0-1-2-3-4-5-6-7-8-9-10-11-12-13
 /*

Modified: RawSpeed/TiffParser.cpp
===================================================================
--- RawSpeed/TiffParser.cpp     2010-12-04 15:26:14 UTC (rev 311)
+++ RawSpeed/TiffParser.cpp     2010-12-04 15:52:26 UTC (rev 312)
@@ -44,8 +44,8 @@
 #undef CHECKPTR
 #endif
 
-#define CHECKSIZE(A) if (A >= mInput->getSize()) throw 
TiffParserException("Error reading TIFF structure. File Corrupt")
-#define CHECKPTR(A) if ((int)A >= ((int)(mInput->data) + size))) throw 
TiffParserException("Error reading TIFF structure. File Corrupt")
+#define CHECKSIZE(A) if (A >= mInput->getSize()) throw 
TiffParserException("Error reading TIFF structure (size out of bounds). File 
Corrupt")
+#define CHECKPTR(A) if ((int)A >= ((int)(mInput->data) + size))) throw 
TiffParserException("Error reading TIFF structure (size out of bounds). File 
Corrupt")
 
 void TiffParser::parseData() {
   const unsigned char* data = mInput->getData(0);

Modified: RawSpeed/TiffParserHeaderless.cpp
===================================================================
--- RawSpeed/TiffParserHeaderless.cpp   2010-12-04 15:26:14 UTC (rev 311)
+++ RawSpeed/TiffParserHeaderless.cpp   2010-12-04 15:52:26 UTC (rev 312)
@@ -39,8 +39,8 @@
 #undef CHECKPTR
 #endif
 
-#define CHECKSIZE(A) if (A >= mInput->getSize()) throw 
TiffParserException("Error reading TIFF structure. File Corrupt")
-#define CHECKPTR(A) if ((int)A >= ((int)(mInput->data) + size))) throw 
TiffParserException("Error reading TIFF structure. File Corrupt")
+#define CHECKSIZE(A) if (A >= mInput->getSize()) throw 
TiffParserException("Error reading Headerless TIFF structure. File Corrupt")
+#define CHECKPTR(A) if ((int)A >= ((int)(mInput->data) + size))) throw 
TiffParserException("Error reading Headerless TIFF structure. File Corrupt")
 
 void TiffParserHeaderless::parseData() {
   parseData(0);

Modified: RawSpeed/TiffParserOlympus.cpp
===================================================================
--- RawSpeed/TiffParserOlympus.cpp      2010-12-04 15:26:14 UTC (rev 311)
+++ RawSpeed/TiffParserOlympus.cpp      2010-12-04 15:52:26 UTC (rev 312)
@@ -40,8 +40,8 @@
 #undef CHECKPTR
 #endif
 
-#define CHECKSIZE(A) if (A >= mInput->getSize()) throw 
TiffParserException("Error reading TIFF structure. File Corrupt")
-#define CHECKPTR(A) if ((int)A >= ((int)(mInput->data) + size))) throw 
TiffParserException("Error reading TIFF structure. File Corrupt")
+#define CHECKSIZE(A) if (A >= mInput->getSize()) throw 
TiffParserException("Error reading Olympus Metadata TIFF structure. File 
Corrupt")
+#define CHECKPTR(A) if ((int)A >= ((int)(mInput->data) + size))) throw 
TiffParserException("Error reading Olympus Metadata TIFF structure. File 
Corrupt")
 
 
 void TiffParserOlympus::parseData() {


_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit

Reply via email to