# HG changeset patch # User Bram Moolenaar # Date 1645029903 -3600 # Node ID 2d24aad37e60667eb7879aad1af1c19914899033 # Parent 94b70a7a4d9406cd56525b4887b5ffd04436396a patch 8.2.4399: crash after ml_get error Commit: https://github.com/vim/vim/commit/f9435e49ef8032e80d38e31e950e4a9b75387533 Author: Bram Moolenaar Date: Wed Feb 16 16:33:28 2022 +0000 patch 8.2.4399: crash after ml_get error Problem: Crash after ml_get error. Solution: When returning "???" flush the line and set ml_line_lnum. diff --git a/src/memline.c b/src/memline.c --- a/src/memline.c +++ b/src/memline.c @@ -2619,9 +2619,12 @@ ml_get_buf( siemsg(_(e_ml_get_invalid_lnum_nr), lnum); --recursive; } + ml_flush_line(buf); + buf->b_ml.ml_flags &= ~ML_LINE_DIRTY; errorret: STRCPY(questions, "???"); buf->b_ml.ml_line_len = 4; + buf->b_ml.ml_line_lnum = lnum; return questions; } if (lnum <= 0) // pretend line 0 is line 1 diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -751,6 +751,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 4399, +/**/ 4398, /**/ 4397,