Ignore:
Timestamp:
14/04/09 16:16:26 (3 years ago)
Author:
Freddie Akeroyd
Message:

Fix possible NXdataset issue by adding 1 to allocated size to cover
string NULL termination. Refs #174.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/4.2/applications/nxconvert_common.c

    r1225 r1226  
    187187                if (NXmalloc (&dataBuffer, dataRank, dataDimensions, dataType) != NX_OK) return NX_ERROR; 
    188188                if (NXgetdata (inId, dataBuffer)  != NX_OK) return NX_ERROR; 
    189                 if (dataType == NX_CHAR) { 
    190                    dataDimensions[0] = strlen((char*)dataBuffer)+1; 
    191                 } 
    192189                if (NXmakedata (outId, name, dataType, dataRank, dataDimensions) != NX_OK) return NX_ERROR; 
    193190                if (NXopendata (outId, name) != NX_OK) return NX_ERROR; 
Note: See TracChangeset for help on using the changeset viewer.