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.
master
David Lawrence Ramsey 2018-08-08 22:38:16 -05:00 committed by Benno Schulenberg
parent e40e6bbf10
commit fd65f74428
1 changed files with 1 additions and 0 deletions

View File

@ -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;