1
0
mirror of https://github.com/systemd/systemd.git synced 2025-02-27 01:57:35 +03:00

pid1: terminate cylon string

Fixes #30121.
This commit is contained in:
Yu Watanabe 2023-11-22 06:54:18 +09:00
parent ca49e745c0
commit 0fe9604359

View File

@ -214,8 +214,10 @@ static void draw_cylon(char buffer[], size_t buflen, unsigned width, unsigned po
if (pos < width-1)
p = mempset(p, ' ', width-1-pos);
if (log_get_show_color())
strcpy(p, ANSI_NORMAL);
p = stpcpy(p, ANSI_NORMAL);
}
*p = '\0';
}
static void manager_flip_auto_status(Manager *m, bool enable, const char *reason) {