Commit cc11fcd7 authored by Philipp Rudo's avatar Philipp Rudo Committed by Kazuhito Hagio
Browse files

[PATCH 07/14] remove use of strcpy() in eta_to_human_short()



Using strcpy can easily cause buffer overflows thus remove it in
eta_to_human_short().

While at it clean up the function. Furthermore increase the buffer
size to 32 to mitigate false positive compiler warnings like

print_info.c:382:42: warning: ‘%lu’ directive output may be truncated writing between 1 and 18 bytes into a region of size 11 [-Wformat-truncation=]
  382 |                 snprintf(msg, len, "eta: %lum%lus", minutes, secs % 60);

Signed-off-by: default avatarPhilipp Rudo <prudo@redhat.com>
parent a854064e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment