Changeset 1442 for trunk/dll/mainwnd.c


Ignore:
Timestamp:
Jul 14, 2009, 2:16:38 AM (16 years ago)
Author:
Gregg Young
Message:

Fixed 2 memory management problems; changes to get FORTIFY build to work again.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/mainwnd.c

    r1439 r1442  
    9191  12 Jul 09 GKY Removed duplicate UM_SETUP2 message from RestoreDirCnrState caused dbl dir
    9292                listings in tree
     93  13 Jul 09 GKY Fixed under allocation of memory in the paint code for the drivebar bitmap buttons
    9394
    9495***********************************************************************/
     
    19291930        hbm = GpiLoadBitmap(hps, 0, iconid, 0, 0);
    19301931        if (hbm) {
    1931           pbmpData = xmallocz(sizeof(PBITMAPINFOHEADER), pszSrcFile, __LINE__);
     1932          pbmpData = xmallocz(sizeof(PBITMAPINFOHEADER) * 3, pszSrcFile, __LINE__);
    19321933          if (pbmpData) {
    19331934            GpiQueryBitmapParameters(hbm, pbmpData);
     
    19361937            aptl[3].x = pbmpData->cx;
    19371938            aptl[3].y = pbmpData->cy;
     1939            GpiWCBitBlt(hps, hbm, 4L, aptl, ROP_SRCCOPY, BBO_PAL_COLORS);
    19381940            free(pbmpData);
    19391941          }
    1940           GpiWCBitBlt(hps, hbm, 4L, aptl, ROP_SRCCOPY, BBO_PAL_COLORS);
    19411942        }
    19421943        memset(&fat, 0, sizeof(fat));
Note: See TracChangeset for help on using the changeset viewer.