[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:
Philipp Rudo <prudo@redhat.com>
Loading
Please sign in to comment