From: Gerd Möllmann Date: Tue, 1 Nov 2022 09:14:07 +0000 (+0100) Subject: Preven a buffer-overflow (bug#58850) X-Git-Tag: emacs-29.0.90~1616^2~360 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d305eaf4ce56177171aa1bcde80bbed5fc486a45;p=emacs.git Preven a buffer-overflow (bug#58850) * src/print.c (print_vectorlike): Don't use sprintf. --- 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;