Changeset 6186 for trunk/src


Ignore:
Timestamp:
Jul 6, 2001, 9:03:42 PM (24 years ago)
Author:
sandervl
Message:

Better pointer/handle check in GlobalFree

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/heap.cpp

    r6184 r6186  
    1 /* $Id: heap.cpp,v 1.29 2001-07-06 13:47:18 sandervl Exp $ */
     1/* $Id: heap.cpp,v 1.30 2001-07-06 19:03:42 sandervl Exp $ */
    22
    33/*
     
    2121#include <heap.h>
    2222#include <odinwrap.h>
     23#include "initterm.h"
    2324
    2425#define DBG_LOCALLOG    DBG_heap
     
    569570   dprintf(("KERNEL32: GlobalFree %x", hmem));
    570571
     572   /* verify lpMem address */
     573   if (hmem >= (HGLOBAL)ulMaxAddr || hmem < (HGLOBAL)0x10000)
     574   {
     575        dprintf(("GlobalFree ERROR BAD HEAP POINTER:%X\n", hmem));
     576        return 0;
     577   }
     578
    571579   if(ISPOINTER(hmem)) /* POINTER */
    572580   {
Note: See TracChangeset for help on using the changeset viewer.