# HG changeset patch # User Bram Moolenaar # Date 1610918105 -3600 # Node ID aa8fa32cdca3d9bdc698c892036489916d128253 # Parent d35c5eccbdadabfb6a044b29ea20db17da923b59 patch 8.2.2374: accessing uninitialized memory in test_undo Commit: https://github.com/vim/vim/commit/82aa6e09e02b138ab7ee6b79ecac487813f117e5 Author: Bram Moolenaar Date: Sun Jan 17 22:04:02 2021 +0100 patch 8.2.2374: accessing uninitialized memory in test_undo Problem: Accessing uninitialized memory in test_undo. Solution: Do not look in typebuf.tb_buf if it is empty. (Dominique Pell?, closes #7697) diff --git a/src/edit.c b/src/edit.c --- a/src/edit.c +++ b/src/edit.c @@ -1586,7 +1586,7 @@ decodeModifyOtherKeys(int c) // Recognize: // form 0: {lead}{key};{modifier}u // form 1: {lead}27;{modifier};{key}~ - if ((c == CSI || (c == ESC && *p == '[')) && typebuf.tb_len >= 4) + if (typebuf.tb_len >= 4 && (c == CSI || (c == ESC && *p == '['))) { idx = (*p == '['); if (p[idx] == '2' && p[idx + 1] == '7' && p[idx + 2] == ';') 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 */ /**/ + 2374, +/**/ 2373, /**/ 2372,