mirror of
https://github.com/rfivet/uemacs.git
synced 2024-12-19 07:46:24 -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