[#781] gxml_write_gifti can write invalid XML GIFTI type

Please log in

State: more information
Closed
Date:
2008-02-21 22:06
Priority: more information
3
Submitted By:
Nick Schmansky (nschmans)
Assigned To: more information
Richard Reynolds (rickr)
Hardware: 
All
Product: 
Software A
Operating System: 
Linux
Component: 
None
Version: 
None
Severity: 
None
Resolution: 
None
Summary: more information
gxml_write_gifti can write invalid XML GIFTI type

Detailed description

in the routine gxml_write_gifti, in gifti_xml.c, in this code:

if(gim->version){ fprintf(fp," Version=\"%s\"", gim->version); first = 0; }
fprintf(fp,"%sNumberOfDataArrays=\"%d\"", first ? "" : " ", gim->numDA);

if gim->version is empty (null), then the GIFTI type field will look like this:



that is, a space is missing after GIFTI, making gifti_test choke on this file.

so either an extra space is necessary, like this:

"%s NumberOfDa....

or maybe the routine should error exit if the version is missing (which is a better idea i think).


Response

Message

Date: 2008-02-21 22:36
Sender: Richard Reynolds

That space is added. The compliance checks are in gifti_valid_gifti_image(), where I plan to add more.

Attached Files:

Name Download
No Files Currently Attached

Changes:

Field Old Value Date By
close_date2008-02-21 22:362008-02-21 22:36rickr
status_idOpen2008-02-21 22:36rickr