- Add code to detect buffer overflows and buffer underflows on memory operations. This code is only enabled if _DEBUG is defined.

- Change all calls to malloc, realloc and free to cmd_alloc, cmd_realloc and cmd_free

svn path=/trunk/; revision=28065
This commit is contained in:
Thomas Bluemel 2007-08-01 10:17:13 +00:00
parent 9da2ad12a6
commit df91a99233
57 changed files with 335 additions and 221 deletions

View file

@ -138,7 +138,6 @@
*/
#include <precomp.h>
#include "resource.h"
#ifdef INCLUDE_CMD_CHDIR
@ -154,7 +153,7 @@ VOID InitLastPath (VOID)
VOID FreeLastPath (VOID)
{
if (lpLastPath)
free (lpLastPath);
cmd_free (lpLastPath);
}
/* help functions for getting current path from drive
@ -766,11 +765,11 @@ INT CommandShowCommandsDetail (LPTSTR cmd, LPTSTR param)
/* If a param was send, display help of correspondent command */
if (_tcslen(param))
{
LPTSTR NewCommand = malloc((_tcslen(param)+4)*sizeof(TCHAR));
LPTSTR NewCommand = cmd_alloc((_tcslen(param)+4)*sizeof(TCHAR));
_tcscpy(NewCommand, param);
_tcscat(NewCommand, _T(" /?"));
DoCommand(NewCommand);
free(NewCommand);
cmd_free(NewCommand);
}
/* Else, display detailed commands list */
else