Author: paultcochrane
Date: Sat Oct 6 02:48:53 2007
New Revision: 21908
Modified:
trunk/src/debug.c
Log:
[core] Corrected an overrun of dynamically allocated memory. A message
string was not allocated with enough memory to include the null character
termination. Coverity CID 126.
Modified: trunk/src/debug.c
==============================================================================
--- trunk/src/debug.c (original)
+++ trunk/src/debug.c Sat Oct 6 02:48:53 2007
@@ -399,7 +399,8 @@
i = 0;
/* XXX who frees that */
- c = (char *)mem_sys_allocate(255);
+ /* need to allocate 256 chars as string is null-terminated i.e. 255 + 1*/
+ c = (char *)mem_sys_allocate(256);
PIO_eprintf(interp, "\n(pdb) ");