commit | 1b9129809d8269acb8e7c79d8fc99c7976b4f76e | [log] [tgz] |
---|---|---|
author | Bram Moolenaar <Bram@vim.org> | Tue Sep 29 21:45:41 2020 +0200 |
committer | Bram Moolenaar <Bram@vim.org> | Tue Sep 29 21:45:41 2020 +0200 |
tree | c295744bdee425cdea4e00883d084957c1cb45ce | |
parent | f43e7ac4eee22dbb26fc069ec9a3d1598ec8dfe9 [diff] [blame] |
patch 8.2.1773: crash when calling mapset() with a list as first argument Problem: Crash when calling mapset() with a list as first argument. Solution: Check for NULL. (closes #7040)
diff --git a/src/map.c b/src/map.c index eed3a55..6a994d4 100644 --- a/src/map.c +++ b/src/map.c
@@ -2304,6 +2304,8 @@ char_u *arg; which = tv_get_string_buf_chk(&argvars[0], buf); + if (which == NULL) + return; mode = get_map_mode(&which, 0); is_abbr = (int)tv_get_number(&argvars[1]);