1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-23 07:19:15 +00:00

Avoid segfaults in replace-buffer-contents with large buffers

* src/editfns.c (Freplace_buffer_contents): Don't release
malloc'ed memory as long as we are using it.  (Bug#31888)
This commit is contained in:
Eli Zaretskii 2018-06-22 15:57:47 +03:00
parent d22b8d1ad1
commit d6aa55e2b4

View File

@ -3215,7 +3215,6 @@ buffer stay intact. */)
/* Since we didnt 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