mirror of
https://github.com/rfivet/uemacs.git
synced 2024-12-18 15:26:23 -05:00
Fix crash when "insert-string $HOME", missing length check when copying environment variables.
This commit is contained in:
parent
d0a5516da6
commit
897c50013e
3
exec.c
3
exec.c
@ -294,7 +294,8 @@ int nextarg(const char *prompt, char *buffer, int size, int terminator)
|
|||||||
execstr = token(execstr, buffer, size);
|
execstr = token(execstr, buffer, size);
|
||||||
|
|
||||||
/* evaluate it */
|
/* evaluate it */
|
||||||
strcpy(buffer, getval(buffer));
|
strncpy( buffer, getval( buffer), size - 1) ;
|
||||||
|
buffer[ size - 1] = '\0' ;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user