projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d22b8d1
)
Avoid segfaults in replace-buffer-contents with large buffers
author
Eli Zaretskii
<eliz@gnu.org>
Fri, 22 Jun 2018 12:57:47 +0000
(15:57 +0300)
committer
Eli Zaretskii
<eliz@gnu.org>
Fri, 22 Jun 2018 12:57:47 +0000
(15:57 +0300)
* src/editfns.c (Freplace_buffer_contents): Don't release
malloc'ed memory as long as we are using it. (Bug#31888)
src/editfns.c
patch
|
blob
|
history
diff --git
a/src/editfns.c
b/src/editfns.c
index fc5b6c117f57c9c352a4d55238e004940eba91a5..d15ae59029dd135863daf7a99e4efa1aaa9d542d 100644
(file)
--- a/
src/editfns.c
+++ b/
src/editfns.c
@@
-3215,7
+3215,6
@@
buffer stay intact. */)
/* Since we didn’t define EARLY_ABORT, we should never abort
early. */
eassert (! early_abort);
- SAFE_FREE ();
Fundo_boundary ();
ptrdiff_t count = SPECPDL_INDEX ();
@@
-3261,8
+3260,10
@@
buffer stay intact. */)
--i;
--j;
}
+ unbind_to (count, Qnil);
+ SAFE_FREE ();
- return
unbind_to (count, Qnil)
;
+ return
Qnil
;
}
static void