Mercurial > vim
comparison src/testdir/test_cmdline.vim @ 24697:a6e43da449af v8.2.2887
patch 8.2.2887: crash when passing null string to fullcommand()
Commit: https://github.com/vim/vim/commit/4c8e8c6e19b75d632b042aa0ba0a2ab769b2162e
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed May 26 19:49:09 2021 +0200
patch 8.2.2887: crash when passing null string to fullcommand()
Problem: Crash when passing null string to fullcommand().
Solution: Check for NULL pointer. (closes https://github.com/vim/vim/issues/8256)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 26 May 2021 20:00:07 +0200 |
parents | d7644bffe128 |
children | 68e3adbeaf20 |
comparison
equal
deleted
inserted
replaced
24696:dc0703c51aef | 24697:a6e43da449af |
---|---|
473 \ } | 473 \ } |
474 | 474 |
475 for [in, want] in items(tests) | 475 for [in, want] in items(tests) |
476 call assert_equal(want, fullcommand(in)) | 476 call assert_equal(want, fullcommand(in)) |
477 endfor | 477 endfor |
478 call assert_equal('', fullcommand(test_null_string())) | |
478 | 479 |
479 call assert_equal('syntax', 'syn'->fullcommand()) | 480 call assert_equal('syntax', 'syn'->fullcommand()) |
480 endfunc | 481 endfunc |
481 | 482 |
482 func Test_shellcmd_completion() | 483 func Test_shellcmd_completion() |