Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
ab226c50
Commit
ab226c50
authored
Mar 28, 2009
by
Stefan Monnier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(Finsert_file_contents): Don't limit size to INT_MAX/4.
parent
46dfb8fb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
src/ChangeLog
src/ChangeLog
+4
-0
src/fileio.c
src/fileio.c
+5
-1
No files found.
src/ChangeLog
View file @
ab226c50
2009-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
* fileio.c (Finsert_file_contents): Don't limit size to INT_MAX/4.
2009-03-27 Jan Djärv <jan.h.d@swipnet.se>
* frame.c (x_set_font): If the fullscreen property is non-nil, adjust
...
...
src/fileio.c
View file @
ab226c50
...
...
@@ -3300,7 +3300,11 @@ variable `last-coding-system-used' to the coding system actually used. */)
overflow. The calculations below double the file size
twice, so check that it can be multiplied by 4 safely. */
if (XINT (end) != st.st_size
||
st
.
st_size
>
INT_MAX
/
4
)
/* Actually, it should test either INT_MAX or LONG_MAX
depending on which one is used for EMACS_INT. But in
any case, in practice, this test is redundant with the
one above.
|| st.st_size > INT_MAX / 4 */)
error ("Maximum buffer size exceeded");
/* The file size returned from stat may be zero, but data
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment