mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 09:50:02 +00:00
filter out invalid S_FUN entries
svn path=/trunk/; revision=12128
This commit is contained in:
parent
66468c3013
commit
8236f00175
1 changed files with 17 additions and 9 deletions
|
@ -278,15 +278,23 @@ int main(int argc, char* argv[])
|
||||||
|
|
||||||
for (i = 0; i < SymbolsCount; i++)
|
for (i = 0; i < SymbolsCount; i++)
|
||||||
{
|
{
|
||||||
if (StabEntry[i].n_type == N_FUN ||
|
switch ( StabEntry[i].n_type )
|
||||||
StabEntry[i].n_type == N_SLINE ||
|
{
|
||||||
StabEntry[i].n_type == N_SO)
|
case N_FUN:
|
||||||
{
|
if ( StabEntry[i].n_desc == 0 ) // line # 0 isn't valid
|
||||||
memmove(&StabEntry[Count], &StabEntry[i], sizeof(STAB_ENTRY));
|
continue;
|
||||||
if ( StabEntry[Count].n_value >= ImageBase )
|
break;
|
||||||
StabEntry[Count].n_value -= ImageBase;
|
case N_SLINE:
|
||||||
Count++;
|
break;
|
||||||
}
|
case N_SO:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
memmove(&StabEntry[Count], &StabEntry[i], sizeof(STAB_ENTRY));
|
||||||
|
if ( StabEntry[Count].n_value >= ImageBase )
|
||||||
|
StabEntry[Count].n_value -= ImageBase;
|
||||||
|
Count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
StrEntry = malloc(sizeof(STR_ENTRY) * Count);
|
StrEntry = malloc(sizeof(STR_ENTRY) * Count);
|
||||||
|
|
Loading…
Reference in a new issue