----- Original Message -----
From: jcup...@gmail.com
To: magick-developers@imagemagick.org
Sent: Monday, March 9, 2009 2:07:09 PM GMT -05:00 US/Canada Eastern
Subject: [magick-developers] DICOM bug

Hi,.

I think I've found a bug in the DICOM reader. In the current 6.4.9-8,
coders/dcm.c has in sketch form:

  unsigned long
    index,
  ...
  index=ReadBlobLSBShort(image)

then at line 3487:

        if (signed_data == 1)
          index-=32767;

     I haven't reviewed the code, but it looks as though the intent is
     to do the subtraction mod 2^16, so

        if (signed_data == 1)
          index = ((long)index - 32767) & 0xffff);

Glenn
_______________________________________________
Magick-developers mailing list
Magick-developers@imagemagick.org
http://studio.imagemagick.org/mailman/listinfo/magick-developers

Reply via email to