forked from barebox/barebox
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
efi-stdio: Fix out of bounds error in puts
In efi_console_puts we use 'nbytes' as counter to break out of iterating over the input string. An escape sequence consumes more than 1 input character, still nbytes is only decremented by one. This results in iterating past the end of the input string once an escape sequence is in the buffer. This patch introduces efi_console_add_char() to write a character in the buffer and efi_console_flush() to print out the current buffer. This fixes the issue and also allows us to prevent writing past the end of the internal output buffer. Signed-off-by: Sascha Hauer <[email protected]>
- Loading branch information
1 parent
e4a8037
commit 008af16
Showing
1 changed file
with
39 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters