Author: post
Date: 2012-10-09 14:23:37 +0200 (Tue, 09 Oct 2012)
New Revision: 477

Modified:
   RawSpeed/FileMap.cpp
   RawSpeed/FileMap.h
Log:
Allocate 16 extra bytes for input buffer.

Modified: RawSpeed/FileMap.cpp
===================================================================
--- RawSpeed/FileMap.cpp        2012-10-08 18:46:57 UTC (rev 476)
+++ RawSpeed/FileMap.cpp        2012-10-09 12:23:37 UTC (rev 477)
@@ -27,7 +27,7 @@
 FileMap::FileMap(uint32 _size) : size(_size) {
   if (!size)
     throw FileIOException("Filemap of 0 bytes not possible");
-  data = (uchar8*)_aligned_malloc(size + 4, 16);
+  data = (uchar8*)_aligned_malloc(size + 16, 16);
   if (!data) {
     throw FileIOException("Not enough memory to open file.");
   }

Modified: RawSpeed/FileMap.h
===================================================================
--- RawSpeed/FileMap.h  2012-10-08 18:46:57 UTC (rev 476)
+++ RawSpeed/FileMap.h  2012-10-09 12:23:37 UTC (rev 477)
@@ -40,7 +40,7 @@
 {
 public:
   FileMap(uint32 _size);                 // Allocates the data array itself
-  FileMap(uchar8* _data, uint32 _size);  // Data already allocated.
+  FileMap(uchar8* _data, uint32 _size);  // Data already allocated, if 
possible allocate 16 extra bytes.
   ~FileMap(void);
   const uchar8* getData(uint32 offset);
   uchar8* getDataWrt(uint32 offset) {return &data[offset];}


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

Reply via email to