[Mrtrix-discussion] buffer overflow for nifti files under ubuntu
11.04
Parnesh.Raniga at csiro.au
Parnesh.Raniga at csiro.au
Mon Jul 18 21:14:43 PDT 2011
Hello Donald,
I had a brief look at the archives and could not find any information on this so I am assuming it hasn't been raised before. There is a buffer overflow occurring with mrtrix programs (e.g tracks2prob) when using nifti and analyse file formats as well as compile time warnings about it under ubuntu 11.04. I have traced this to lines 293 in nifti1.cpp and 338 in analyse.cpp.
These lines should be changed from
strncpy ((gchar*) &NH->regular, "r\0", 2);
to
strncpy ((gchar*) &NH->regular, "r\0", 1); or strncpy ((gchar*) &NH->regular, "r", 1);
Cheers,
Parnesh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.nitrc.org/pipermail/mrtrix-discussion/attachments/20110719/ab794eaa/attachment.html
More information about the Mrtrix-discussion
mailing list