[Dcmlib] Bug in ComputeRLEInfo

Eric Boix Eric.Boix at creatis.insa-lyon.fr
Tue Nov 16 15:50:53 CET 2004


	Hi Jean-Michel,

Quoting jean-michel.rouet at philips.com <jean-michel.rouet at philips.com>:
> Nevertheless the following code still suffers from a slight problem:
You mean a severe mistake !

> rleSegmentOffsetTable is declared as a 15 long array, and the filling loop 
> (the one with ReadInt32) goes from index 1 to 15 included.
  [...snip...]
> If you start at index 1 and end at 15, then the rleSegmentOffsetTable 
> should be allocated as a 16 long array and not 15, so that 
> rleSegmentOffsetTable[15] is defined.

You are perfectly rigth ! I knew it, that fortran style loops were
dangerous ;) Sorry for sending you back to the reading of the norm...
Corresponding fix was commited.

   Many thanks !
   Eric.



More information about the Dcmlib mailing list