From: Paul Eggert Date: Sat, 2 Feb 2019 18:23:48 +0000 (-0800) Subject: Fix unlikely user-full-name integer overflow X-Git-Tag: emacs-27.0.90~3680 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6f52478e0c42f02cba940c21b18242f05e1ea2a1;p=emacs.git Fix unlikely user-full-name integer overflow * src/editfns.c (Fuser_full_name): Don’t assume uid fits into fixnum. --- diff --git a/src/editfns.c b/src/editfns.c index 360cdbe02ee..a9ac263dafa 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -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);