BIC-MNI / minc-tools

Basic minc-tools from former minc repository
Other
30 stars 25 forks source link

rawtominc wrongness with nonstandard dimname #41

Open bcdarwin opened 8 years ago

bcdarwin commented 8 years ago

In the Pyminc test suite (such as it is) we generate a random MINC file roughly as follows:

rawtominc /tmp/test_vector.mnc -input /dev/urandom 3 100 150 125 -dimorder vector_dimension,xspace,yspace,zspace

This didn't used to crash, but after compiling minc-toolkit-v2 with gcc-4.9.1 produces a segfault. The problem seems to be here: if the dimname isn't standard, index doesn't seem to get updated, hence will be an incorrect (possibly uninitialized) value ...

rdvincent commented 8 years ago

Thanks for the report - I just checked in a probable fix (commit id 751ca893194ff6bc39d64adf99a4e1ef178df1bb).