dicomParser icon indicating copy to clipboard operation
dicomParser copied to clipboard

Images from Siemens Avanto and Skyra caused buffer overrun

Open xpackal5 opened this issue 7 years ago • 11 comments

Hello. If I try to view images from Siemens Avanto and Skyra cornerstone give error. dicomParser:parseDicomDataSetExplicit: buffer overrun

xpackal5 avatar Feb 26 '17 08:02 xpackal5

I am getting a lot of that as well, what parsing method are you using. I get a similiar issue with dicomParser.explicitDataSetToJS but not with dicomParser.parseDicom

jkrot avatar Feb 27 '17 20:02 jkrot

I just ran into something similar today. I'm not sure if it's related to a certain set of images. What's really weird is that it worked on one computer but did not work on another.

jssuttles avatar Apr 07 '17 19:04 jssuttles

Just in case computer specs are necessary: core i3-4130, 4gb RAM, windows 7 pro sp1, optiplex 3020. That's the computer for which it didn't work.

jssuttles avatar Apr 07 '17 20:04 jssuttles

I've got the same error with images from a Phillips Multiva MR.

You can download it from here: http://45.63.8.72/downloads/mr_phillips_multiva.dcm

leonardorame avatar Jun 16 '17 01:06 leonardorame

Please forget about that, it turns out I've got that image from Conquest using WADO and forcing TransferSyntax to 1.2.840.10008.1.2.4.70, so it must be a Conquest bug while converting to JpegLossless.

leonardorame avatar Jun 16 '17 02:06 leonardorame

Usually buffer overruns have to do with misinterpreting the DICOM (most likely because the DICOM is corrupt or non compliant in some way). Does anybody have any sample DICOM that can reproduce this bug? @jkrot @xpackal5 Otherwise we might as well close this.

yagni avatar May 05 '18 04:05 yagni

From what I can remember it was due to some tags just being completely missing not empty that the parser was expecting or chosing the end tag for parsing and it was missing.

I don't have those files anymore but I had to do a ton of defense coding around these files.

On Fri, May 4, 2018, 11:02 PM yagni [email protected] wrote:

Usually buffer overruns have to do with misinterpreting the DICOM (most likely because the DICOM is corrupt or non compliant in some way). Does anybody have any sample DICOM that can reproduce this bug? @jkrot https://github.com/jkrot @xpackal5 https://github.com/xpackal5 Otherwise we might as well close this.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/cornerstonejs/dicomParser/issues/62#issuecomment-386777121, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHmq7gVS-8azJMVst2Ghs1rSdHoLETrks5tvSRFgaJpZM4MMTKz .

jkrot avatar May 05 '18 04:05 jkrot

Since the reference given above does not work anymore today, may I suggest instead the following (valid) reference:

  • https://sourceforge.net/p/gdcm/gdcmdata/ci/master/tree/undefined_length_un_vr.dcm

Tested with both DCMTK and GDCM.

malaterre avatar Nov 15 '18 11:11 malaterre

We are still seeing the issue. Not sure on the image source being Siemens Avanto or Skyra though.

A consequent problem is that the error thrown includes the entire bytestream dataSet, so if we are logging all thrown errors, the log files gets to GBs very quickly and the application is too choked writing the log to do anything else.

amrita-syn avatar Mar 13 '21 08:03 amrita-syn

@amrita-syn Do you have an anonymized DICOM you can submit for us to troubleshoot with? If your DICOM isn't Avanto or Skyra, I'd recommend making a new issue and attaching there. Since so many vendors are different, there's a wide variety of reasons we could get a buffer overrun and keeping them as separate issues makes it easier to manage (as well as easier for people to find details about a specific cause).

yagni avatar Mar 14 '21 23:03 yagni

In my work, the tag before the exception is thrown is the culprit. After remove the tag element, it works again.

hgu-mdsol avatar Aug 11 '22 19:08 hgu-mdsol

image

A consequent problem is that the error thrown includes the entire bytestream dataSet, so if we are logging all thrown errors, the log files gets to GBs very quickly and the application is too choked writing the log to do anything else.

IT-Highmore avatar Sep 27 '23 05:09 IT-Highmore

The debug output is indeed very annoying. it is still happening btw. Just had it with a CT Brilliance 64 from Philips

matthiasg avatar Dec 12 '23 12:12 matthiasg

@matthiasg Can you provide a de-identified file by any chance and open a new issue? I can troubleshoot or look into a fix pretty quickly if you can get me a file.

I'm going to close this ticket because it's become a catch-all for buffer overrun, which can be caused by many things. The files linked in this issue now work in dicomParser. Also, the debug output issue is tracked here.

yagni avatar Dec 12 '23 14:12 yagni