emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master d305eaf4ce: Preven a buffer-overflow (bug#58850)


From: Gerd Moellmann
Subject: master d305eaf4ce: Preven a buffer-overflow (bug#58850)
Date: Tue, 1 Nov 2022 05:14:56 -0400 (EDT)

branch: master
commit d305eaf4ce56177171aa1bcde80bbed5fc486a45
Author: Gerd Möllmann <gerd@gnu.org>
Commit: Gerd Möllmann <gerd@gnu.org>

    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 65218084a4..07560518c4 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;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]