On 4/12/24 00:33, Richard Henderson wrote:
From: Philippe Mathieu-Daudé <[email protected]>
sprintf() is deprecated on Darwin since macOS 13.0 / XCode 14.1,
resulting in painful developper experience. Use snprintf() instead.
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
---
linux-user/flatload.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/linux-user/flatload.c b/linux-user/flatload.c
index 5b62aa0a2b..1bb2f400bc 100644
--- a/linux-user/flatload.c
+++ b/linux-user/flatload.c
@@ -692,7 +692,7 @@ static int load_flat_shared_library(int id, struct lib_info
*libs)
char buf[16];
/* Create the file name */
- sprintf(buf, "/lib/lib%d.so", id);
+ snprintf(buf, sizeof(buf), "/lib/lib%d.so", id);
/* Open the file up */
bprm.filename = buf;
Reviewed-by: Pierrick Bouvier <[email protected]>