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:
parent
3e74249c4c
commit
9c8739a456
2 changed files with 7 additions and 2 deletions
|
@ -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>
|
2009-12-27 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* video/readers/jpeg.c (GRUB_MOD_FINI (grub_cmd_jpegtest)): Rename to ..
|
* video/readers/jpeg.c (GRUB_MOD_FINI (grub_cmd_jpegtest)): Rename to ..
|
||||||
|
|
|
@ -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;
|
next_new_line = (grub_uint32_t *) last_position;
|
||||||
|
|
||||||
while (grub_getstringwidth (current_position, next_new_line) > line_len
|
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 != ' '
|
||||||
next_new_line != last_position))
|
&& next_new_line > current_position))
|
||||||
{
|
{
|
||||||
next_new_line--;
|
next_new_line--;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue