[Insight-users] bug in MetaUtils.cxx

Julien Jomier julien.jomier at kitware.com
Thu Nov 6 09:32:46 EST 2008


Stefan,

Thanks for the detailed report. We have reproduced the error and a fix 
is ready. It will probably be in the 3.10 release.

Thanks again,
Julien

Stefan Klein wrote:
> Hi all,
> 
> When saving small mhd images with compression, my program crashes 
> sometimes. It occurs when the compressed data buffer is LARGER than the 
> uncompressed data buffer. Obviously, this odd situation normally only 
> occurs with very small images.
> 
> Attached is an example program. Can anybody reproduce this bug? On my 
> computer, using Windows XP 32 bit, MS visual C++ 2008 Express, ITK 3.8 
> the program crashes. Using the latest ITK version, the program does not 
> crash, but creates a corrupt mhd, which cannot be read anymore.
> 
> I could reproduce the bug on a Linux 64 bit system with gcc 4.1.2.
> 
> The source of the error seems to lie in MetaUtils.cxx, lines 673-737. A 
> buffer with length of the input buffer is allocated. When the output 
> buffer becomes larger (z.total_out), the problem initiates. On my 
> computer, the crash took place in MetaImage.cxx, line 1756, when the 
> compressed data buffer memory is deleted.
> 
> Kind regards,
> Stefan
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users


More information about the Insight-users mailing list