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:
parent
c73d18ac42
commit
6f52478e0c
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue