commit fd65f7442868811e016b6aa90f92c87f1d139984
parent e40e6bbf1027d1ce708a93aa5b152d87f94b7f56
Author: David Lawrence Ramsey <pooka109@gmail.com>
Date: Wed, 8 Aug 2018 22:38:16 -0500
undo: always initialize the 'newsize' element in the undo struct
So that do_redo() cannot set the file size to a "random" value.
This fixes https://savannah.gnu.org/bugs/?54478.
Diffstat:
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/src/text.c b/src/text.c
@@ -1313,6 +1313,7 @@ void add_undo(undo_type action)
u->mark_begin_lineno = openfile->current->lineno;
u->mark_begin_x = openfile->current_x;
u->wassize = openfile->totsize;
+ u->newsize = openfile->totsize;
u->xflags = 0;
u->grouping = NULL;