|
|
Hi,
I've been working on an experimental port of Povray 3.6.1 to a new platform:
one on which a long is 64-bits, and a pointer 32. I've been tracking down an
error due to the end of a block of memory being over-written and have narrowed
it down to the file source/lighting.cpp. This contains the following code in
InitMallocPools():
ShadowMediaListPoolSize = (long *)POV_MALLOC(MaxMediaPoolDepth*sizeof(long
*), "temp media list");
LightingMediaListPoolSize = (long *)POV_MALLOC(MaxMediaPoolDepth*sizeof(long
*), "temp media list");
MediaIntervalPoolSize = (long *)POV_MALLOC(MaxMediaPoolDepth*sizeof(long *),
"temp media list");
The fix would obviously be to replace the "*sizeof (long *)" with
"sizeof(long)":
ShadowMediaListPoolSize = (long *)POV_MALLOC(MaxMediaPoolDepth*sizeof(long),
"temp media list");
LightingMediaListPoolSize = (long
*)POV_MALLOC(MaxMediaPoolDepth*sizeof(long), "temp media list");
MediaIntervalPoolSize = (long *)POV_MALLOC(MaxMediaPoolDepth*sizeof(long),
"temp media list");
Apologies if I'm not reporting this to the right place, or it was fixed long
ago...!
HTH,
Paul
Post a reply to this message
|
|