1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-05-18 19:06:18 -07:00

Preven a buffer-overflow (bug#58850)

* src/print.c (print_vectorlike): Don't use sprintf.
This commit is contained in:
Gerd Möllmann 2022-11-01 10:14:07 +01:00
parent 5bf5e526d5
commit d305eaf4ce

View file

@ -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;