Skip to content

Commit

Permalink
Overflow for Siemens data [missing protocol name] (rordenlab#466)
Browse files Browse the repository at this point in the history
  • Loading branch information
neurolabusc committed Dec 23, 2020
1 parent 829f541 commit 0587941
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion console/nii_dicom.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ extern "C" {
#define kCPUsuf " " //unknown CPU
#endif

#define kDCMdate "v1.0.20201223"
#define kDCMdate "v1.0.20201224"
#define kDCMvers kDCMdate " " kJP2suf kLSsuf kCCsuf kCPUsuf

static const int kMaxEPI3D = 1024; //maximum number of EPI images in Siemens Mosaic
Expand Down
2 changes: 2 additions & 0 deletions console/nii_dicom_batch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -968,6 +968,8 @@ void rescueProtocolName(struct TDICOMdata *d, const char * filename) {
char protocolName[kDICOMStrLarge], fmriExternalInfo[kDICOMStrLarge], coilID[kDICOMStrLarge], consistencyInfo[kDICOMStrLarge], coilElements[kDICOMStrLarge], pulseSequenceDetails[kDICOMStrLarge], wipMemBlock[kDICOMStrLarge];
TCsaAscii csaAscii;
siemensCsaAscii(filename, &csaAscii, d->CSA.SeriesHeader_offset, d->CSA.SeriesHeader_length, shimSetting, coilID, consistencyInfo, coilElements, pulseSequenceDetails, fmriExternalInfo, protocolName, wipMemBlock);
if (strlen(protocolName) >= kDICOMStr)
protocolName[kDICOMStr-1] = 0;
strcpy(d->protocolName, protocolName);
#endif
}
Expand Down

0 comments on commit 0587941

Please sign in to comment.