From d305eaf4ce56177171aa1bcde80bbed5fc486a45 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gerd=20M=C3=B6llmann?= Date: Tue, 1 Nov 2022 10:14:07 +0100 Subject: [PATCH] Preven a buffer-overflow (bug#58850) * src/print.c (print_vectorlike): Don't use sprintf. --- src/print.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/print.c b/src/print.c index 65218084a4c..07560518c46 100644 --- a/src/print.c +++ b/src/print.c @@ -2017,8 +2017,8 @@ print_vectorlike (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag, i = sprintf (buf, " stmt=%p", XSQLITE (obj)->stmt); strout (buf, i, i, printcharfun); } - i = sprintf (buf, " name=%s", XSQLITE (obj)->name); - strout (buf, i, i, printcharfun); + print_c_string (" name=", printcharfun); + print_c_string (XSQLITE (obj)->name, printcharfun); printchar ('>', printcharfun); } break; -- 2.39.2