Thanks!!!

Is there anyone here who can commit this fix to our current codebase?

On Mon, Nov 23, 2015 at 9:56 PM, Dirk Kretschmann <[email protected]>
wrote:

> Hi!
>
> in decode.c, macros DWG_ENTITY and DWG_OBJECT, line 231 and line 250 you
> have
> calloc (sizeof (foo), 1) which should be calloc (1, sizeof (foo))
>
> in dwg.spec, function decode_3dsolid, line 1271/1272 you have
> FIELD_VALUE(sat_data) = (BITCODE_RC**) realloc(FIELD_VALUE(sat_data), i *
> sizeof(BITCODE_RC*));
> FIELD_VALUE(block_size) = (BITCODE_BL*) realloc(FIELD_VALUE(block_size), i
> * sizeof(BITCODE_BL));
> the problem is in line 1256 you initialize i = 0 so the memory you are
> trying to write to after that is not valid. It should be
> FIELD_VALUE(sat_data) = (BITCODE_RC**) realloc(FIELD_VALUE(sat_data),
> (i+1) * sizeof(BITCODE_RC*));
> FIELD_VALUE(block_size) = (BITCODE_BL*) realloc(FIELD_VALUE(block_size),
> (i+1) * sizeof(BITCODE_BL));
>
> Keep up the good work!
>

Reply via email to