mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-24 22:07:36 +00:00
Limit insert-file-contents to MAX_ALLOCA
* src/fileio.c (READ_BUF_SIZE): Don’t allocate more than MAX_ALLOCA bytes in a single stack array.
This commit is contained in:
parent
b7dfd39c8b
commit
07a3386fbb
1 changed files with 1 additions and 5 deletions
|
|
@ -3306,11 +3306,7 @@ otherwise, if FILE2 does not exist, the answer is t. */)
|
|||
? Qt : Qnil);
|
||||
}
|
||||
|
||||
#ifndef READ_BUF_SIZE
|
||||
#define READ_BUF_SIZE (64 << 10)
|
||||
#endif
|
||||
/* Some buffer offsets are stored in 'int' variables. */
|
||||
verify (READ_BUF_SIZE <= INT_MAX);
|
||||
enum { READ_BUF_SIZE = MAX_ALLOCA };
|
||||
|
||||
/* This function is called after Lisp functions to decide a coding
|
||||
system are called, or when they cause an error. Before they are
|
||||
|
|
|
|||
Loading…
Reference in a new issue