From: Michael R. <re...@eu...> - 2006-01-30 06:02:52
|
Hi Till, >>Up 0 days 01:33:58@=E2=96=92 (the last two chars are garbled and two s= paces before >> the 0 are missing) > This was due to a bug in the eval() routine in evaluator.c. The problem= :=20 > strncpy does not add a trailing 0, if it truncates a string. Therefore = one=20 > has to manually add the string termination char. Fixed in the CVS. Thanks a lot for debugging. This leak was introduced by fixing another memory leak in the evaluator. The "right" fix would be to use strncpy (x, y, lenght+1) because length does not count the trailing zero. The "very right" fix would be tho change the meaning of 'length' to the size of the string buffer. For any unknown reason I defined it to be the "maximum string length", which leads to this off-by-one errors... I'm going to change this in CVS. bye, Michael --=20 Michael Reinelt <re...@eu...> http://home.pages.at/reinelt GPG-Key 0xDF13BA50 ICQ #288386781 |