Ignore:
Timestamp:
Mar 16, 2004, 2:33:00 PM (21 years ago)
Author:
sandervl
Message:

PROFILE_GetSection regression fix (heap corruption)

File:
1 edited

Legend:

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

    r9597 r10527  
    1 /* $Id: profile.cpp,v 1.35 2003-01-03 16:34:33 sandervl Exp $ */
     1/* $Id: profile.cpp,v 1.36 2004-03-16 13:33:00 sandervl Exp $ */
    22
    33/*
     
    593593                   which is not enough for holding any key name. */
    594594                if(strlen(key->name)>len-2) {
    595                   buffer += len;
     595                  buffer += len-1;
    596596                  len=1; /* Causes the funktion to end with a return code of len-2 */
    597597                  break;
     
    982982}
    983983
     984int WINAPI PROFILE_Initialize (void)
     985{
     986    InitializeCriticalSection( &PROFILE_CritSect );
     987    MakeCriticalSectionGlobal( &PROFILE_CritSect );
     988}
    984989
    985990/***********************************************************************
     
    993998    const char *p;
    994999    FILE *f;
    995 
    996     InitializeCriticalSection( &PROFILE_CritSect );
    997     MakeCriticalSectionGlobal( &PROFILE_CritSect );
    9981000
    9991001    if ( (p = getenv( "ODIN_INI" )) && (f = fopen( p, "r" )) )
Note: See TracChangeset for help on using the changeset viewer.