Changeset 1009 for trunk/dll/notebook.c


Ignore:
Timestamp:
May 10, 2008, 9:51:58 AM (17 years ago)
Author:
Steven Levine
Message:

Add xfree xstrdup Fortify support
Add MT capable Fortify scope logic

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/notebook.c

    r998 r1009  
    214214      pszWorkBuf = xmalloc(MaxComLineStrg, pszSrcFile, __LINE__);
    215215      if (!pszWorkBuf) {
    216         xfree(szCLBuf);
     216        xfree(szCLBuf, pszSrcFile, __LINE__);
    217217        return 0; //already complained
    218218      }
     
    222222        NormalizeCmdLine(pszWorkBuf, szCLBuf);
    223223        memcpy(virus, pszWorkBuf, strlen(pszWorkBuf) + 1);
    224         xfree(pszWorkBuf);
    225         xfree(szCLBuf);
     224        xfree(pszWorkBuf, pszSrcFile, __LINE__);
     225        xfree(szCLBuf, pszSrcFile, __LINE__);
    226226        if (!strchr(virus, '%') && strlen(virus) > 3)
    227227          strcat(virus, " %p");
     
    487487      pszWorkBuf = xmalloc(MaxComLineStrg, pszSrcFile, __LINE__);
    488488      if (!pszWorkBuf) {
    489         xfree(szCLBuf);
     489        xfree(szCLBuf, pszSrcFile, __LINE__);
    490490        return 0; //already complained
    491491      }
     
    522522          strcat(bined, " %a");
    523523      }
    524       xfree(pszWorkBuf);
    525       xfree(szCLBuf);
     524      xfree(pszWorkBuf, pszSrcFile, __LINE__);
     525      xfree(szCLBuf, pszSrcFile, __LINE__);
    526526      PrfWriteProfileString(fmprof, appname, "Viewer", viewer);
    527527      PrfWriteProfileString(fmprof, appname, "Editor", editor);
     
    690690      pszWorkBuf = xmalloc(MaxComLineStrg, pszSrcFile, __LINE__);
    691691      if (!pszWorkBuf) {
    692         xfree(szCLBuf);
     692        xfree(szCLBuf, pszSrcFile, __LINE__);
    693693        return 0; //already complained
    694694      }
     
    723723        memcpy(mailrun, pszWorkBuf, strlen(pszWorkBuf) + 1);
    724724      }
    725       xfree(pszWorkBuf);
    726       xfree(szCLBuf);
     725      xfree(pszWorkBuf, pszSrcFile, __LINE__);
     726      xfree(szCLBuf, pszSrcFile, __LINE__);
    727727      PrfWriteProfileString(fmprof, appname, "HttpRunDir", httprundir);
    728728      PrfWriteProfileString(fmprof, appname, "FtpRunDir", ftprundir);
     
    13261326      pszWorkBuf = xmalloc(MaxComLineStrg, pszSrcFile, __LINE__);
    13271327      if (!pszWorkBuf) {
    1328         xfree(szCLBuf);
     1328        xfree(szCLBuf, pszSrcFile, __LINE__);
    13291329        return 0; //already complained
    13301330      }
     
    13461346          strcat(compare, " %a");
    13471347      }
    1348       xfree(pszWorkBuf);
    1349       xfree(szCLBuf);
     1348      xfree(pszWorkBuf, pszSrcFile, __LINE__);
     1349      xfree(szCLBuf, pszSrcFile, __LINE__);
    13501350      PrfWriteProfileString(fmprof, appname, "Compare", compare);
    13511351      break;
Note: See TracChangeset for help on using the changeset viewer.