* util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
properly with null character.
+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.
}
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")) &&