Displaying 2 results from an estimated 2 matches for "numberofidentri".
Did you mean:
numberofidentries
2001 Dec 08
1
LoadOEMResource crash [Was: Re: Problem report: SHRINKER.ERR, fix to DEVICE_Open/CreateFileA? ]
...*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...
2001 Dec 08
1
LoadOEMResource crash [Was: Re: Problem report: SHRINKER.ERR, fix to DEVICE_Open/CreateFileA? ]
...oot=0x45f000) at
pe_resource.c:82
82 entry = (const IMAGE_RESOURCE_DIRECTORY_ENTRY *)(dir + 1);
(gdb) p dir
$16 = (IMAGE_RESOURCE_DIRECTORY *) 0x45f000
Better.
(gdb) p *dir
$17 = {Characteristics = 0, TimeDateStamp = 0, MajorVersion = 0,
MinorVersion = 0,
NumberOfNamedEntries = 0, NumberOfIdEntries = 0}
Hmm. gdb is able to dereference dir. So what's going on?
(gdb) step
78 {
(gdb) step
82 entry = (const IMAGE_RESOURCE_DIRECTORY_ENTRY *)(dir + 1);
(gdb) step
83 min = dir->NumberOfNamedEntries;
(gdb) p dir
$18 = (IMAGE_RESOURCE_DIRECTORY *) 0x45f000
So far so...