From 28d5bfc098e607d58fae0ba2fab47ccb26244dbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Thu, 11 Apr 2024 12:40:07 +0200 Subject: disas/m68k: Replace sprintf() by snprintf() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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é Reviewed-by: Richard Henderson Reviewed-by: Peter Maydell Message-Id: <20240411104340.6617-2-philmd@linaro.org> Signed-off-by: Richard Henderson --- disas/m68k.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'disas') diff --git a/disas/m68k.c b/disas/m68k.c index 1f16e29..800b414 100644 --- a/disas/m68k.c +++ b/disas/m68k.c @@ -1000,7 +1000,7 @@ print_indexed (int basereg, /* Generate the text for the index register. Where this will be output is not yet determined. */ - sprintf (buf, "%s:%c%s", + snprintf(buf, sizeof(buf), "%s:%c%s", reg_names[(word >> 12) & 0xf], (word & 0x800) ? 'l' : 'w', scales[(word >> 9) & 3]); -- cgit v1.1