Mercurial > vim
view runtime/compiler/dartanalyser.vim @ 33879:d418c82f02a4 v9.0.2149
patch 9.0.2149: [security]: use-after-free in exec_instructions()
Commit: https://github.com/vim/vim/commit/5dd41d4b6370b7b7d09d691f9252b3899c66102a
Author: Christian Brabandt <cb@256bit.org>
Date: Mon Dec 4 22:52:23 2023 +0100
patch 9.0.2149: [security]: use-after-free in exec_instructions()
Problem: [security]: use-after-free in exec_instructions()
Solution: get tv pointer again
[security]: use-after-free in exec_instructions()
exec_instructions may access freed memory, if the GA_GROWS_FAILS()
re-allocates memory. When this happens, the typval tv may still point to
now already freed memory. So let's get that pointer again and compare it
with tv. If those two pointers differ, tv is now invalid and we have to
refresh the tv pointer.
closes: #13621
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 10 Dec 2023 15:16:17 +0100 |
parents | d4c7b3e9cd17 |
children | e1df51f68736 |
line wrap: on
line source
" Vim compiler file " Compiler: Dart Analyzer " Maintainer: Doug Kearns <dougkearns@gmail.com> " Last Change: 2019 May 08 if exists("current_compiler") finish endif let current_compiler = "dartanalyzer" if exists(":CompilerSet") != 2 " older Vim always used :setlocal command -nargs=* CompilerSet setlocal <args> endif let s:cpo_save = &cpo set cpo&vim CompilerSet makeprg=dartanalyzer\ --format\ machine CompilerSet errorformat=%t%\\w%\\+\|%\\w%\\+\|%\\w%\\+\|%f\|%l\|%c\|%\\d%\\+\|%m, \%-G%.%# let &cpo = s:cpo_save unlet s:cpo_save