Fix unlikely user-full-name integer overflow

* src/editfns.c (Fuser_full_name):
Don’t assume uid fits into fixnum.
This commit is contained in:
Paul Eggert 2019-02-02 10:23:48 -08:00
parent c73d18ac42
commit 6f52478e0c

View file

@ -1260,7 +1260,7 @@ name, or nil if there is no such user. */)
/* Substitute the login name for the &, upcasing the first character. */
if (q)
{
Lisp_Object login = Fuser_login_name (make_fixnum (pw->pw_uid));
Lisp_Object login = Fuser_login_name (INT_TO_INTEGER (pw->pw_uid));
USE_SAFE_ALLOCA;
char *r = SAFE_ALLOCA (strlen (p) + SBYTES (login) + 1);
memcpy (r, p, q - p);