From 044e20911b95ec4be14453dde76474a6204acef1 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 28 Apr 2014 14:58:33 +0000 Subject: [PATCH] From Pjotr Svetachov, "I had the osgvolume example crash on me when loading large volume datasets due to an overflow in image.cpp after a unneeded cast from unsigned int to int. Here is a small fix." --- src/osg/Image.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osg/Image.cpp b/src/osg/Image.cpp index 9702d4b21..8634410a2 100644 --- a/src/osg/Image.cpp +++ b/src/osg/Image.cpp @@ -239,7 +239,7 @@ Image::Image(const Image& image,const CopyOp& copyop): { if (image._data) { - int size = image.getTotalSizeInBytesIncludingMipmaps(); + unsigned int size = image.getTotalSizeInBytesIncludingMipmaps(); setData(new unsigned char [size],USE_NEW_DELETE); unsigned char* dest_ptr = _data; for(DataIterator itr(&image); itr.valid(); ++itr)