Mercurial > vim
comparison src/testdir/test_listener.vim @ 32321:b9a8d1c453e1 v9.0.1492
patch 9.0.1492: using uninitialized memory when argument is missing
Commit: https://github.com/vim/vim/commit/b7f2270bab102d68f83a6300699b7f98efad81f2
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Apr 27 16:24:07 2023 +0100
patch 9.0.1492: using uninitialized memory when argument is missing
Problem: Using uninitialized memory when argument is missing.
Solution: Check there are sufficient arguments before the base.
(closes #12302)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 27 Apr 2023 17:30:05 +0200 |
parents | 711ae604980a |
children | 448aef880252 |
comparison
equal
deleted
inserted
replaced
32320:45c1a530fa76 | 32321:b9a8d1c453e1 |
---|---|
210 | 210 |
211 " Invalid arguments | 211 " Invalid arguments |
212 call assert_fails('call listener_add([])', 'E921:') | 212 call assert_fails('call listener_add([])', 'E921:') |
213 call assert_fails('call listener_add("s:StoreListArgs", [])', 'E730:') | 213 call assert_fails('call listener_add("s:StoreListArgs", [])', 'E730:') |
214 call assert_fails('call listener_flush([])', 'E730:') | 214 call assert_fails('call listener_flush([])', 'E730:') |
215 | |
216 call assert_fails('eval ""->listener_add()', 'E119:') | |
215 endfunc | 217 endfunc |
216 | 218 |
217 func s:StoreBufList(buf, start, end, added, list) | 219 func s:StoreBufList(buf, start, end, added, list) |
218 let s:bufnr = a:buf | 220 let s:bufnr = a:buf |
219 let s:list = a:list | 221 let s:list = a:list |