Changeset 955 for trunk/dll


Ignore:
Timestamp:
Feb 16, 2008, 11:32:45 PM (18 years ago)
Author:
Gregg Young
Message:

Prevent trap on scan of drive containing files that exceed maxpath (ticket 215)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/seeall.c

    r943 r955  
    3333  30 Dec 07 GKY Use CommaFmtULL
    3434  30 Dec 07 GKY Use TestFDates for comparing by date
     35  15 Feb 08 GKY Prevent trap on scan of drive containing files that exceed maxpath
    3536
    3637***********************************************************************/
     
    18931894  ULONG x;
    18941895  APIRET rc;
    1895 
    1896   filename = xmalloc(CCHMAXPATH, pszSrcFile, __LINE__);
     1896  static BOOL fDone;
     1897
     1898  filename = xmalloc(CCHMAXPATH + 100, pszSrcFile, __LINE__);
    18971899  if (!filename)
    18981900    return;
     
    19411943        else {
    19421944          *enddir = 0;
    1943           strcpy(enddir, pffbFile->achName);
     1945          strcpy(enddir, pffbFile->achName);
     1946          if (strlen(filename) > CCHMAXPATH) {
     1947            // Complain if pathnames exceeds max
     1948            DosFindClose(hdir);
     1949            free(pffbArray);
     1950            free(filename);
     1951            if (!fDone) {
     1952              fDone = TRUE;
     1953              saymsg(MB_OK | MB_ICONASTERISK,
     1954                     HWND_DESKTOP,
     1955                     GetPString(IDS_WARNINGTEXT),
     1956                     "One or more of your files has a full path name that exceeds the OS/2 maximum");
     1957            }
     1958            return;
     1959          }
    19441960          if (!ad->afalloc || ad->afheadcnt > ad->afalloc - 1) {
    19451961
Note: See TracChangeset for help on using the changeset viewer.