diff options
Diffstat (limited to 'src/undo.c')
-rw-r--r-- | src/undo.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/undo.c b/src/undo.c index 4a4a33cc1..a23c2638f 100644 --- a/src/undo.c +++ b/src/undo.c @@ -1317,6 +1317,12 @@ unserialize_uhp(bufinfo_T *bi, char_u *file_name) int len = undo_read_byte(bi); int what; + if (len == EOF) + { + corruption_error("truncated", file_name); + u_free_uhp(uhp); + return NULL; + } if (len == 0) break; what = undo_read_byte(bi); |