From 73193347133e750faf27f88fd3ab31ce43aff062 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 21 May 2024 06:59:33 +0200 Subject: Adding upstream version 1.47.1. Signed-off-by: Daniel Baumann --- misc/e4defrag.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'misc/e4defrag.c') diff --git a/misc/e4defrag.c b/misc/e4defrag.c index e3011d7..5bfa6ff 100644 --- a/misc/e4defrag.c +++ b/misc/e4defrag.c @@ -1206,9 +1206,8 @@ static int file_statistic(const char *file, const struct stat64 *buf, if (mode_flag & DETAIL) { /* Print statistic info */ - sprintf(msg_buffer, "[%u/%u]%.*s", - defraged_file_count, total_count, - PATH_MAX, file); + snprintf(msg_buffer, sizeof(msg_buffer), "[%u/%u]%.*s", + defraged_file_count, total_count, PATH_MAX, file); if (current_uid == ROOT_UID) { if (strlen(msg_buffer) > 40) printf("\033[79;0H\033[K%s\n" -- cgit v1.2.3