2009-04-14 Bean <bean123ch@gmail.com>
* util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol properly with null character.
This commit is contained in:
parent
9b8fd01509
commit
33c846be29
2 changed files with 14 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
2009-04-14 Bean <bean123ch@gmail.com>
|
||||
|
||||
* util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
|
||||
properly with null character.
|
||||
|
||||
2009-04-14 Felix Zielcke <fzielcke@z-51.de>
|
||||
|
||||
* configure: Remove.
|
||||
|
|
|
@ -344,10 +344,17 @@ write_symbol_table (FILE* fp, char *image,
|
|||
}
|
||||
else
|
||||
{
|
||||
char short_name[9];
|
||||
char *name;
|
||||
|
||||
name = ((pe_symtab->long_name[0]) ? pe_symtab->short_name :
|
||||
pe_strtab + pe_symtab->long_name[1]);
|
||||
if (pe_symtab->long_name[0])
|
||||
{
|
||||
strncpy (short_name, pe_symtab->short_name, 8);
|
||||
short_name[8] = 0;
|
||||
name = short_name;
|
||||
}
|
||||
else
|
||||
name = pe_strtab + pe_symtab->long_name[1];
|
||||
|
||||
if ((strcmp (name, "_grub_mod_init")) &&
|
||||
(strcmp (name, "_grub_mod_fini")) &&
|
||||
|
|
Loading…
Reference in a new issue