Mercurial > vim
view runtime/tools/mve.awk @ 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 | 3fc0f57ecb91 |
children |
line wrap: on
line source
#!/usr/bin/nawk -f # # Change "nawk" to "awk" or "gawk" if you get errors. # # Make Vim Errors # Processes errors from cc for use by Vim's quick fix tools # specifically it translates the ---------^ notation to a # column number # BEGIN { FS="[:,]" } /^cfe/ { file=$3 msg=$5 split($4,s," ") line=s[2] } # You may have to substitute a tab character for the \t here: /^[\t-]*\^/ { p=match($0, ".*\\^" ) col=RLENGTH-2 printf("%s, line %d, col %d : %s\n", file,line,col,msg) }