Changeset 1797 for trunk/dll


Ignore:
Timestamp:
Sep 10, 2014, 1:56:52 AM (11 years ago)
Author:
Gregg Young
Message:

Found two instances of mask and/or mask->szMask outside the Filter semaphore. The second one trapped. This fix puts them all inside the Filter semaphore which prevents dcd from being freed. So far so good.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/filter.c

    r1786 r1797  
    8383  CHAR *file;
    8484
    85   if (!mask)
    86     return TRUE;                        // No mask data
    87 
    8885  DosRequestMutexSem(hmtxFiltering, SEM_INDEFINITE_WAIT);
     86  if (!mask) {
     87    DosReleaseMutexSem(hmtxFiltering);
     88    return TRUE;
     89  } // No mask data
     90
    8991  pci = (PCNRITEM) rmini;
    9092  // Always show root directory
     
    128130    file = pci->pszFileName;
    129131
    130   if (!mask->pszMasks[1]) {
     132  if (!mask->pszMasks[1]) { // Just one mask string
     133    BOOL wild = wildcard(strchr(mask->szMask, '\\') || strchr(mask->szMask, ':') ?
     134                         pci->pszFileName : file, mask->szMask, FALSE);
    131135    DosReleaseMutexSem(hmtxFiltering);
    132     // Just one mask string
    133     return wildcard(strchr(mask->szMask, '\\') ||
    134                       strchr(mask->szMask, ':') ?
    135                         pci->pszFileName : file,
    136                     mask->szMask,
    137                     FALSE);
     136    return wild;
    138137  }
    139138
Note: See TracChangeset for help on using the changeset viewer.