Changeset 1011
- Timestamp:
- May 11, 2008, 5:00:39 AM (17 years ago)
- Location:
- trunk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/arccnrs.c
r1009 r1011 83 83 #include "notebook.h" // CfgDlgProc 84 84 #include "fm3dll.h" 85 #include "fortify.h" 85 86 86 87 #pragma data_seg(DATA1) -
trunk/dll/dircnrs.c
r1009 r1011 3321 3321 dcd->stopflag++; 3322 3322 if (!dcd->dontclose && ParentIsDesktop(dcd->hwndFrame, (HWND) 0)) 3323 3323 PostMsg((HWND) 0, WM_QUIT, MPVOID, MPVOID); 3324 3324 if (!dcd->hwndObject || 3325 3325 !PostMsg(dcd->hwndObject, WM_CLOSE, MPVOID, MPVOID)) { -
trunk/dll/draglist.c
r1009 r1011 36 36 #include "errutil.h" // Dos_Error... 37 37 #include "fm3dll.h" 38 #include "fortify.h" 38 39 39 40 static PSZ pszSrcFile = __FILE__; -
trunk/dll/fm3dll.def
r994 r1011 286 286 RunFM2Util_ .268, 287 287 xDosFindFirst_ .269, 288 xDosFindNext_ .270 289 288 xDosFindNext_ .270, 289 xfree_ .271, 290 xmalloc_ .272 291 -
trunk/dll/grep.c
r1009 r1011 51 51 #include "tmrsvcs.h" // ITIMER_DESC 52 52 #include "fm3dll.h" 53 #include "fortify.h" 53 54 54 55 #pragma data_seg(DATA2) -
trunk/dll/mainwnd.c
r1009 r1011 182 182 WinEnableWindow(WinQueryWindow(hwndMain, QW_PARENT), TRUE); 183 183 fNoTileUpdate = FALSE; 184 xfree((char *)mp1, pszSrcFile, __LINE__);184 //xfree((char *)mp1, pszSrcFile, __LINE__); 185 185 if (fAutoTile) 186 186 TileChildren(hwndMain, TRUE); -
trunk/dll/ufortify.h
r1005 r1011 17 17 #define FORTIFY_BEFORE_SIZE 32 /* Bytes to allocate before block */ 18 18 #define FORTIFY_BEFORE_VALUE 0xA3 /* Fill value before block */ 19 19 20 20 #define FORTIFY_AFTER_SIZE 32 /* Bytes to allocate after block */ 21 21 #define FORTIFY_AFTER_VALUE 0xA5 /* Fill value after block */ … … 47 47 48 48 /* #define FORTIFY_NO_PERCENT_P */ /* sprintf() doesn't support %p */ 49 /* #define FORTIFY_STRDUP *//* if you use non-ANSI strdup() */49 #define FORTIFY_STRDUP /* if you use non-ANSI strdup() */ 50 50 51 51 // #include "_malloc.h" -
trunk/dll/wrappers.c
r1009 r1011 332 332 # ifdef FORTIFY 333 333 Fortify_free(pv, pszSrcFile, uiLineNumber); 334 # else 334 # else 335 335 free(pv); 336 336 # endif … … 345 345 # ifdef FORTIFY 346 346 PVOID pv = Fortify_malloc(cBytes, pszSrcFile, uiLineNumber); 347 # else 347 # else 348 348 PVOID pv = malloc(cBytes); 349 349 # endif … … 359 359 PVOID xmallocz(size_t cBytes, PCSZ pszSrcFile, UINT uiLineNumber) 360 360 { 361 PVOID pv = malloc(cBytes); 362 363 if (!pv) 364 Runtime_Error(pszSrcFile, uiLineNumber, GetPString(IDS_OUTOFMEMORY)); 365 else 361 PVOID pv = xmalloc(cBytes, pszSrcFile, uiLineNumber); 362 363 if (pv) 366 364 memset(pv, 0, cBytes); 367 365 … … 374 372 { 375 373 if (pvIn != NullStr) { 376 PVOID pv = realloc(pvIn, cBytes); 374 # ifdef FORTIFY 375 PVOID pv = Fortify_realloc(pvIn, cBytes, pszSrcFile, uiLineNumber); 376 # else 377 PVOID pv = realloc(pvIn, cBytes); 378 # endif 377 379 378 380 if (!pv && cBytes) … … 391 393 # ifdef FORTIFY 392 394 PSZ psz = Fortify_strdup(pszIn, pszSrcFile, uiLineNumber); 393 # else 395 # else 394 396 PSZ psz = strdup(pszIn); 395 397 # endif -
trunk/eas.c
r1010 r1011 27 27 #include "dll\fm3dll.h" 28 28 29 static PSZ pszSrcFile = __FILE__; 30 29 31 int main (int argc,char *argv[]) 30 32 { … … 52 54 if (!list) { 53 55 strcpy(fullname, "*"); 54 list = malloc(sizeof(CHAR *) * 2);56 list = xmalloc(sizeof(CHAR *) * 2, pszSrcFile, __LINE__); 55 57 if (list && 56 58 insert_filename(HWND_DESKTOP,fullname,TRUE,FALSE) && 57 59 *fullname && *fullname != '*') { 58 59 60 list[0] = fullname; 61 list[1] = NULL; 60 62 } 61 63 } … … 74 76 } 75 77 if (list) 76 free(list);78 xfree(list, pszSrcFile, __LINE__); 77 79 return 0; 78 80 }
Note:
See TracChangeset
for help on using the changeset viewer.