Author: post
Date: 2010-04-24 16:41:52 +0200 (Sat, 24 Apr 2010)
New Revision: 218

Modified:
   RawSpeed/RawImage.cpp
Log:
Check if image size is less than 0.

Modified: RawSpeed/RawImage.cpp
===================================================================
--- RawSpeed/RawImage.cpp       2010-04-24 12:44:47 UTC (rev 217)
+++ RawSpeed/RawImage.cpp       2010-04-24 14:41:52 UTC (rev 218)
@@ -58,6 +58,8 @@
 void RawImageData::createData() {
   if (dim.x > 65535 || dim.y > 65535)
     ThrowRDE("RawImageData: Dimensions too large for allocation.");
+  if (dim.x <= 0 || dim.y <= 0)
+    ThrowRDE("RawImageData: Dimension of one sides is less than 1 - cannot 
allocate image.");
   if (data)
     ThrowRDE("RawImageData: Duplicate data allocation in createData.");
   pitch = (((dim.x * bpp) + 15) / 16) * 16;


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

Reply via email to