Re: LoadOEMResource crash [Was: Re: Problem report: SHRINKER.ERR, fix to DEVICE_Open/CreateFileA? ]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



More information on exception #2. The offending function is:

/**********************************************************************
  *  find_entry_by_id
  *
  * Find an entry by id in a resource directory
  */
static const IMAGE_RESOURCE_DIRECTORY *find_entry_by_id( const 
IMAGE_RESOURCE_DIRECTORY *dir,
                                                          WORD id, const 
void *root )
{
     const IMAGE_RESOURCE_DIRECTORY_ENTRY *entry;
     int min, max, pos;

     entry = (const IMAGE_RESOURCE_DIRECTORY_ENTRY *)(dir + 1);
     min = dir->NumberOfNamedEntries;
     max = min + dir->NumberOfIdEntries - 1;
     while (min <= max)
     {
         pos = (min + max) / 2;
         if (entry[pos].u1.s2.Id == id)
             return (IMAGE_RESOURCE_DIRECTORY *)((char *)root + 
entry[pos].u2.s3.OffsetToDirectory);
         if (entry[pos].u1.s2.Id > id) max = pos - 1;
         else min = pos + 1;
     }
     return NULL;
}


Where the offending line is

     min = dir->NumberOfNamedEntries;

It looks like the call was made with dir = 0x0045F000, id = 0xE, and I'm 
not sure about root.

Probably find_entry_by_id was called from either PE_FindResourceW or 
PE_FindResourceExW, possibly through find_entry_by_nameW, which was 
called by RES_FindResource2, which is the last trace before the exception.

If I could get winedbg/gdb to continue past the first exception but stop 
at the second, I might be able to find out more :(

--Rob




[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux