Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
2e6813b0
Commit
2e6813b0
authored
Jun 16, 2011
by
Paul Eggert
Browse files
* editfns.c (Finsert_char): Don't dump core with very negative counts.
parent
599a9e4f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
src/ChangeLog
src/ChangeLog
+2
-0
src/editfns.c
src/editfns.c
+2
-2
No files found.
src/ChangeLog
View file @
2e6813b0
2011-06-16 Paul Eggert <eggert@cs.ucla.edu>
* editfns.c (Finsert_char): Don't dump core with very negative counts.
* insdel.c (replace_range): Fix buf overflow when insbytes < outgoing.
* insdel.c, lisp.h (buffer_overflow): New function.
...
...
src/editfns.c
View file @
2e6813b0
...
...
@@ -2343,11 +2343,11 @@ from adjoining text, if those properties are sticky. */)
len
=
CHAR_STRING
(
c
,
str
);
else
str
[
0
]
=
c
,
len
=
1
;
if
(
XINT
(
count
)
<=
0
)
return
Qnil
;
if
(
BUF_BYTES_MAX
/
len
<
XINT
(
count
))
buffer_overflow
();
n
=
XINT
(
count
)
*
len
;
if
(
n
<=
0
)
return
Qnil
;
stringlen
=
min
(
n
,
256
*
len
);
string
=
(
char
*
)
alloca
(
stringlen
);
for
(
i
=
0
;
i
<
stringlen
;
i
++
)
...
...
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