2009-12-27 Vladimir Serbinenko <phcoder@gmail.com>

* normal/menu_text.c (grub_print_message_indented): Prevent
	past-the-end-of-array dereference.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2009-12-27 22:32:52 +01:00
parent 3e74249c4c
commit 9c8739a456
2 changed files with 7 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2009-12-27 Vladimir Serbinenko <phcoder@gmail.com>
* normal/menu_text.c (grub_print_message_indented): Prevent
past-the-end-of-array dereference.
2009-12-27 Vladimir Serbinenko <phcoder@gmail.com>
* video/readers/jpeg.c (GRUB_MOD_FINI (grub_cmd_jpegtest)): Rename to ..

View file

@ -137,8 +137,8 @@ grub_print_message_indented (const char *msg, int margin_left, int margin_right)
next_new_line = (grub_uint32_t *) last_position;
while (grub_getstringwidth (current_position, next_new_line) > line_len
|| (*next_new_line != ' ' && next_new_line > current_position &&
next_new_line != last_position))
|| (next_new_line != last_position && *next_new_line != ' '
&& next_new_line > current_position))
{
next_new_line--;
}