Changeset 1077 for trunk/dll/makelist.c


Ignore:
Timestamp:
Jul 18, 2008, 8:11:54 PM (17 years ago)
Author:
Steven Levine
Message:

Enhance Fortify infrastructure
Add Fortify_SetOwner Fortify_ChangeOwner Fortify_ChangeScope
Add FORTIFY_VERBOSE_SCOPE_ENTER_EXIT support
Add more fm/2 Fortify tooling and rework existing tooling for correct nesting
Still lots to do for cross-thread allocations
Add misc.h
Add walkem.h

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/makelist.c

    r1063 r1077  
    1515  20 Aug 07 GKY Move #pragma alloc_text to end for OpenWatcom compat
    1616  29 Feb 08 GKY Use xfree where appropriate
     17  17 Jul 08 SHL Add SetListOwner for Fortify support
    1718
    1819***********************************************************************/
     
    260261    for (x = 0; list[x]; x++) {
    261262      if (item == list[x]) {
    262         free(list[x]);
     263        free(list[x]);
    263264        list[x] = NULL;
    264265        for (y = x;; y++) {
     
    272273        }
    273274#       ifdef FORTIFY
    274         Fortify_LeaveScope();
     275        Fortify_LeaveScope();
    275276#        endif
    276277        break;
     
    301302}
    302303
     304#ifdef FORTIFY
     305
     306VOID SetListOwner(LISTINFO *li)
     307{
     308  if (li) {
     309    CHAR **list = li->list;
     310    if (list) {
     311      UINT x;
     312      for (x = 0; list[x]; x++)
     313        Fortify_ChangeOwner(list[x]);
     314    }
     315    Fortify_ChangeOwner(li);
     316  }
     317}
     318
     319#endif // FORTIFY
     320
    303321#pragma alloc_text(MAKELIST,AddToList,AddToFileList,BuildList,FreeListInfo,FreeList)
    304322#pragma alloc_text(MAKELIST,SortList,BuildArcList,RemoveFromList,CombineLists)
     323#ifdef FORTIFY
     324#pragma alloc_text(MAKELIST,SetListOwner)
     325#endif // FORTIFY
Note: See TracChangeset for help on using the changeset viewer.