mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
dbghelp: Fix bug in managing COFF files array.
This commit is contained in:
parent
9d3be00df2
commit
1d4381664c
1 changed files with 12 additions and 6 deletions
|
@ -137,14 +137,20 @@ static int coff_add_file(struct CoffFileSet* coff_files, struct module* module,
|
|||
static void coff_add_symbol(struct CoffFile* coff_file, struct symt* sym)
|
||||
{
|
||||
if (coff_file->neps + 1 >= coff_file->neps_alloc)
|
||||
{
|
||||
if (coff_file->entries)
|
||||
{
|
||||
coff_file->neps_alloc *= 2;
|
||||
coff_file->entries = (coff_file->entries) ?
|
||||
HeapReAlloc(GetProcessHeap(), 0, coff_file->entries,
|
||||
coff_file->neps_alloc * sizeof(struct symt*)) :
|
||||
HeapAlloc(GetProcessHeap(), 0,
|
||||
coff_file->entries = HeapReAlloc(GetProcessHeap(), 0, coff_file->entries,
|
||||
coff_file->neps_alloc * sizeof(struct symt*));
|
||||
}
|
||||
else
|
||||
{
|
||||
coff_file->neps_alloc = 32;
|
||||
coff_file->entries = HeapAlloc(GetProcessHeap(), 0,
|
||||
coff_file->neps_alloc * sizeof(struct symt*));
|
||||
}
|
||||
}
|
||||
coff_file->entries[coff_file->neps++] = sym;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue