Changeset 1048 for trunk/dll/dirsize.c


Ignore:
Timestamp:
Jul 7, 2008, 6:01:04 AM (17 years ago)
Author:
Gregg Young
Message:

Fix for trap related to pci->pszLongName flag

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/dirsize.c

    r1039 r1048  
    329329        }
    330330        // Need unique buffer 23 Jul 07 SHL
    331         pci->pszLongName = xmalloc(2, pszSrcFile, __LINE__);
    332         pci->pszLongName[0] = 0;        // Make null string
    333         pci->pszLongName[1] = 1;        // Flag root - hack cough
     331        pci->pszLongName = xmalloc(3, pszSrcFile, __LINE__);
     332        if (pci->pszLongName) {
     333          pci->pszLongName[0] = 0;      // Make null string
     334          pci->pszLongName[1] = 1;      // Flag root - hack cough
     335          pci->pszLongName[2] = 0;        // terminate anyway
     336        }
    334337      }
    335338      else
     
    10241027        WinDestroyPointer(pState->hptr);
    10251028      DosSleep(16); //05 Aug 07 GKY 33
    1026       xfree(pState, pszSrcFile, __LINE__);                      // Let's hope no one is still looking
     1029      xfree(pState, pszSrcFile, __LINE__); // Let's hope no one is still looking
    10271030# ifdef FORTIFY
    10281031  Fortify_LeaveScope();
Note: See TracChangeset for help on using the changeset viewer.