From: srit Date: Thu, 4 Nov 2010 18:22:44 +0000 (+0000) Subject: Corrected erroneous free when a real RECTILINEAR field is detected X-Git-Tag: v1.2.0~301 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=f9ba8e0c066f58c8d9f2b10db4306f42470fe7a2;p=clitk.git Corrected erroneous free when a real RECTILINEAR field is detected --- diff --git a/common/clitkXdrImageIOReader.cxx b/common/clitkXdrImageIOReader.cxx index bc3a24a..6f70244 100644 --- a/common/clitkXdrImageIOReader.cxx +++ b/common/clitkXdrImageIOReader.cxx @@ -683,6 +683,7 @@ int clitk::XdrImageIO::ReadImageInformationWithError() } } + float *p = points; switch (field) { case UNIFORM: for (i=0; i0.1) { + if (fabs((p[j+1]-p[j])*10-GetSpacing(i))>0.1) { free(points); fclose(fstream); return ER_NOT_HANDLED; } } - points += (int)GetDimensions(i); + p += (int)GetDimensions(i); } - for (i=0; i