Commit 6f52478e authored by Paul Eggert's avatar Paul Eggert

Fix unlikely user-full-name integer overflow

* src/editfns.c (Fuser_full_name):
Don’t assume uid fits into fixnum.
parent c73d18ac
Pipeline #682 passed with stage
in 50 minutes and 31 seconds
......@@ -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));
char *r = SAFE_ALLOCA (strlen (p) + SBYTES (login) + 1);
memcpy (r, p, q - p);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment