[Insight-developers] Limitation in MetaIO causing problems in itkNeuralNetworkFileReader/Writer

kent williams norman-k-williams at uiowa.edu
Mon Aug 20 17:42:37 EDT 2007


I logged this as a bug: http://www.itk.org/Bug/view.php?id=5545

The bug report has more details, but there are 2 limitations with MetaIO, in
the context of the NeuralNet I/O classes: The MET_FieldRecordType is a C
structure, not a C++ class, and it contains a value array with a fixed size
of 255.

I'm testing a very quick and dirty fix -- simply enlarging the value array
so that Hans can move forward with his NeuralNetwork code testing*, but
MetaIO maybe deserves some new scrutiny.

Given that it's been around for years in ITK, I can't think of what I'd do
that wouldn't break backwards compatibility. The obvious thing to do would
be to move MET_FieldRecordType to a C++ class, make the value array
resizable, etc.  Any code depending on the current state of play would
break.


* and putting a test in MET_InitWriteField so it won't scribble all over
memory.  There are, as I count them, 4 separate potential buffer overruns in
that function.



More information about the Insight-developers mailing list