mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 19:55:41 +00:00
Fixup the R_MAGIC code.
svn path=/trunk/; revision=28344
This commit is contained in:
parent
b8921e7fad
commit
421174102d
1 changed files with 4 additions and 4 deletions
|
@ -427,12 +427,12 @@ RUsedRedZoneCheck ( PR_POOL pool, PR_USED pUsed, char* Addr, const char* file, i
|
||||||
|
|
||||||
ASSERT ( Addr >= (char*)pool->UserBase && Addr < ((char*)pool->UserBase + pool->UserSize - 16) );
|
ASSERT ( Addr >= (char*)pool->UserBase && Addr < ((char*)pool->UserBase + pool->UserSize - 16) );
|
||||||
#ifdef R_MAGIC
|
#ifdef R_MAGIC
|
||||||
if ( pUsed->UsedMagic == MM_PPOOL_FREEMAGIC )
|
if ( pUsed->UsedMagic == R_FREE_MAGIC )
|
||||||
{
|
{
|
||||||
pUsed->UserSize = 0; // just to keep from confusion, MmpBadBlock() doesn't return...
|
pUsed->UserSize = 0; // just to keep from confusion, MmpBadBlock() doesn't return...
|
||||||
RiBadBlock ( pUsed, Addr, "double-free", file, line, 0 );
|
RiBadBlock ( pUsed, Addr, "double-free", file, line, 0 );
|
||||||
}
|
}
|
||||||
if ( pUsed->UsedMagic != MM_PPOOL_USEDMAGIC )
|
if ( pUsed->UsedMagic != R_USED_MAGIC )
|
||||||
{
|
{
|
||||||
RiBadBlock ( pUsed, Addr, "bad magic", file, line, 0 );
|
RiBadBlock ( pUsed, Addr, "bad magic", file, line, 0 );
|
||||||
}
|
}
|
||||||
|
@ -650,7 +650,7 @@ RiUsedInit ( PR_USED Block, rulong Tag )
|
||||||
{
|
{
|
||||||
Block->Status = 1;
|
Block->Status = 1;
|
||||||
RUsedFillStack ( Block );
|
RUsedFillStack ( Block );
|
||||||
#if R_MAGIC
|
#ifdef R_MAGIC
|
||||||
Block->UsedMagic = R_USED_MAGIC;
|
Block->UsedMagic = R_USED_MAGIC;
|
||||||
#endif//R_MAGIC
|
#endif//R_MAGIC
|
||||||
//ASSERT_SIZE ( Block->Size );
|
//ASSERT_SIZE ( Block->Size );
|
||||||
|
@ -978,7 +978,7 @@ RPoolQueryTag ( void* Addr )
|
||||||
{
|
{
|
||||||
PR_USED Block = RBodyToHdr(Addr);
|
PR_USED Block = RBodyToHdr(Addr);
|
||||||
// TODO FIXME - should we validate params?
|
// TODO FIXME - should we validate params?
|
||||||
#if R_MAGIC
|
#ifdef R_MAGIC
|
||||||
if ( Block->UsedMagic != R_USED_MAGIC )
|
if ( Block->UsedMagic != R_USED_MAGIC )
|
||||||
return 0xDEADBEEF;
|
return 0xDEADBEEF;
|
||||||
#endif//R_MAGIC
|
#endif//R_MAGIC
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue