diff options
| author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2024-04-11 12:40:07 +0200 |
|---|---|---|
| committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2024-06-04 10:02:39 +0200 |
| commit | 28d5bfc098e607d58fae0ba2fab47ccb26244dbb (patch) | |
| tree | 5d9fb6a82afcbad9b9097cf656403f4e9a02b973 /disas/m68k.c | |
| parent | a93b4061b0e2ff914be9476d74ca6a4f9a8926a1 (diff) | |
| download | focaccia-qemu-28d5bfc098e607d58fae0ba2fab47ccb26244dbb.tar.gz focaccia-qemu-28d5bfc098e607d58fae0ba2fab47ccb26244dbb.zip | |
disas/m68k: Replace sprintf() by snprintf()
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é <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-Id: <20240411104340.6617-2-philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'disas/m68k.c')
| -rw-r--r-- | disas/m68k.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/disas/m68k.c b/disas/m68k.c index 1f16e295ab..800b4145ac 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]); |