* grub-core/gettext/gettext.c (grub_mofile_open): Call
grub_gettext_delete_list before changing grub_gettext_max to avoid running out of array bounds.
This commit is contained in:
parent
7acd2ae1fb
commit
cf1adfdff5
2 changed files with 10 additions and 3 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,9 +1,15 @@
|
||||||
2012-02-27 Vladimir Serbinenko <phcoder@gmail.com>
|
2012-02-28 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* grub-core/gettext/gettext.c (grub_mofile_open): Call
|
||||||
|
grub_gettext_delete_list before changing grub_gettext_max to avoid
|
||||||
|
running out of array bounds.
|
||||||
|
|
||||||
|
2012-02-28 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* grub-core/term/i386/pc/vga_text.c: Add GRUB_MACHINE_MULTIBOOT to
|
* grub-core/term/i386/pc/vga_text.c: Add GRUB_MACHINE_MULTIBOOT to
|
||||||
grub_vga_text_init/grub_vga_text_fini.
|
grub_vga_text_init/grub_vga_text_fini.
|
||||||
|
|
||||||
2012-02-27 Vladimir Serbinenko <phcoder@gmail.com>
|
2012-02-28 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* grub-core/loader/i386/xnu.c (grub_xnu_boot): Fix format specification.
|
* grub-core/loader/i386/xnu.c (grub_xnu_boot): Fix format specification.
|
||||||
|
|
||||||
|
|
|
@ -257,6 +257,8 @@ grub_mofile_open (const char *filename)
|
||||||
"mo: invalid mo version in file: %s", filename);
|
"mo: invalid mo version in file: %s", filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
grub_gettext_delete_list ();
|
||||||
|
|
||||||
grub_gettext_offset_original = grub_le_to_cpu32 (head.offset_original);
|
grub_gettext_offset_original = grub_le_to_cpu32 (head.offset_original);
|
||||||
grub_gettext_offset_translation = grub_le_to_cpu32 (head.offset_translation);
|
grub_gettext_offset_translation = grub_le_to_cpu32 (head.offset_translation);
|
||||||
grub_gettext_max = grub_le_to_cpu32 (head.number_of_strings);
|
grub_gettext_max = grub_le_to_cpu32 (head.number_of_strings);
|
||||||
|
@ -266,7 +268,6 @@ grub_mofile_open (const char *filename)
|
||||||
grub_file_close (fd_mo);
|
grub_file_close (fd_mo);
|
||||||
fd_mo = 0;
|
fd_mo = 0;
|
||||||
|
|
||||||
grub_gettext_delete_list ();
|
|
||||||
grub_gettext_msg_list = grub_zalloc (grub_gettext_max
|
grub_gettext_msg_list = grub_zalloc (grub_gettext_max
|
||||||
* sizeof (grub_gettext_msg_list[0]));
|
* sizeof (grub_gettext_msg_list[0]));
|
||||||
if (!grub_gettext_msg_list)
|
if (!grub_gettext_msg_list)
|
||||||
|
|
Loading…
Reference in a new issue