questions > Buffer Overflow
Showing 1-3 of 3 posts
Display:
Results per page:
Mar 17, 2021  09:03 AM | argavi
Buffer Overflow
Hi everybody,

We have been using dcm2niix without any problem for months until last week!

We also updated to the newest version - 1.0.20201102 - (although we had a not so old one - 1.0.20190720), and the problem still persists!

/mnt/batchs$ dcm2niix-master/build/bin/dcm2niix -o /mnt/Patients/Files/CNS_103_1 -f %i_%p /mnt/Patients/DICOMS/CNS_103_1/DICOM
Chris Rorden's dcm2niiX version v1.0.20201102 GCC7.5.0 x86-64 (64-bit Linux)
Found 5785 DICOM file(s)
Warning: interpolated protocol 't2_flair' may be unsuitable for dwidenoise/mrdegibbs. /mnt/Patients/DICOMS/CNS_103_1/DICOM/PAT00000/STU00000/SER00018/IMG00046
Warning: Adjusting for negative MosaicRefAcqTimes (issue 271).
Warning: Adjusting for negative MosaicRefAcqTimes (issue 271).
*** buffer overflow detected ***: dcm2niix-master/build/bin/dcm2niix terminated
Aborted ('core' generated)
/mnt/batchs$

I deleted three lines that repeat a lot. Those are
Warning: Adjusting for negative MosaicRefAcqTimes (issue 271).

Illegal/Obsolete DICOM: Overlay Bits Allocated must be 1, not 16
Illegal/Obsolete DICOM: Overlay Bit Position shall be 0, not 12

I believe these overlayed bits are the source of the problem but my knowledge is limited
Perhaps somebody can give me an idea to try?

I want to add that a colleague of mine, can run dcm2niix without any problems in a Windows computer with these same images
Thanks in advance,
Aran
Mar 17, 2021  10:03 AM | Chris Rorden
RE: Buffer Overflow
Sounds like issue 454
  https://github.com/rordenlab/dcm2niix/issues/454

This will be resolved in the imminent next stable release. I believe using LLVM or a more recent version of GCC also resolves this. The easiest way to resolve this by compiling the development branch:

git clone --branch development https://github.com/rordenlab/dcm2niix.gi...
cd dcm2niix/console
make
./dcm2niix

I feel confident this will resolve your issue. If not, please tell me.
Mar 17, 2021  10:03 AM | argavi
RE: Buffer Overflow
We found the source of the error in our end

There is a sequence called Mosaic(and probably something else), which is used by technicians
to inspect the quality of the MRI, where the volumes are shown all in 1 dicom(see attached).

dcm2niix can not transform this sequence into a NIFTI. We worked around this calling dcm2niix
to every sequence folder. It works perfectly with all the other and breaks with this one, but we don't
need it.

Instead of dcm2niix DICOM, dcm2niix DICOM/PAT/STU/SEQ01 with a "for".

But glad to know that it is going to be solved soon!

Thanks for the quick reply,

aran