mirror of
https://gitlab.freedesktop.org/plymouth/plymouth.git
synced 2026-05-05 01:48:00 +02:00
Merge branch 'main' into 'main'
main: fix out of bounds write See merge request plymouth/plymouth!265
This commit is contained in:
commit
897217ccc9
1 changed files with 5 additions and 9 deletions
14
src/main.c
14
src/main.c
|
|
@ -1465,16 +1465,12 @@ void
|
|||
on_new_kmsg_message (state_t *state,
|
||||
kmsg_message_t *kmsg_message)
|
||||
{
|
||||
long size = strlen (kmsg_message->message) + 1;
|
||||
char output[size];
|
||||
ply_buffer_append (state->boot_buffer, "%s\n", kmsg_message->message);
|
||||
|
||||
strcpy (output, kmsg_message->message);
|
||||
strcat (output, "\n");
|
||||
|
||||
ply_buffer_append_bytes (state->boot_buffer, output, size);
|
||||
|
||||
if (state->boot_splash != NULL)
|
||||
ply_boot_splash_update_output (state->boot_splash, output, size);
|
||||
if (state->boot_splash != NULL) {
|
||||
ply_boot_splash_update_output (state->boot_splash, kmsg_message->message, strlen (kmsg_message->message));
|
||||
ply_boot_splash_update_output (state->boot_splash, "\n", 1);
|
||||
}
|
||||
}
|
||||
|
||||
static bool
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue