Author: post
Date: 2010-04-25 01:14:31 +0200 (Sun, 25 Apr 2010)
New Revision: 222
Modified:
RawSpeed/ArwDecoder.cpp
Log:
ARW2 Uncompressed: Avoid unsigned underflow if file has been heavily truncated.
Modified: RawSpeed/ArwDecoder.cpp
===================================================================
--- RawSpeed/ArwDecoder.cpp 2010-04-24 17:29:40 UTC (rev 221)
+++ RawSpeed/ArwDecoder.cpp 2010-04-24 23:14:31 UTC (rev 222)
@@ -148,6 +148,9 @@
guint pitch = mRaw->pitch;
const guchar *in = input.getData();
+ if (input.getRemainSize() < (w * 3 / 2))
+ ThrowRDE("Sony Decoder: Image data section too small, file probably
truncated");
+
if (input.getRemainSize() < (w*h*3 / 2))
h = input.getRemainSize() / (w * 3 / 2) - 1;
_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit