From 1bd33b747602606a251a350ca7b1c5de9f6b3c64 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sun, 9 Jun 2024 19:41:03 +0200 Subject: [PATCH] CLI: change uses of sprintf into snprintf --- sapi/cli/ps_title.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sapi/cli/ps_title.c b/sapi/cli/ps_title.c index 21a9f38e33d..41226e50264 100644 --- a/sapi/cli/ps_title.c +++ b/sapi/cli/ps_title.c @@ -321,7 +321,7 @@ const char* ps_title_errno(int rc) #ifdef PS_USE_WIN32 case PS_TITLE_WINDOWS_ERROR: - sprintf(windows_error_details, "Windows error code: %lu", GetLastError()); + snprintf(windows_error_details, sizeof(windows_error_details), "Windows error code: %lu", GetLastError()); return windows_error_details; #endif }