diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-05-31 19:55:04 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-31 19:55:04 +0800 |
commit | 0c95028688dfee776750c4732811508294557ba2 (patch) | |
tree | 35d448b3140a4186fe7979531a04a453ea8a83b9 /src/nvim/regexp_defs.h | |
parent | 1a20aed3fb35e00f96aa18abb69d35912c9e119d (diff) | |
download | rneovim-0c95028688dfee776750c4732811508294557ba2.tar.gz rneovim-0c95028688dfee776750c4732811508294557ba2.tar.bz2 rneovim-0c95028688dfee776750c4732811508294557ba2.zip |
vim-patch:8.2.5046: vim_regsub() can overwrite the destination (#18812)
Problem: vim_regsub() can overwrite the destination.
Solution: Pass the destination length, give an error when it doesn't fit.
https://github.com/vim/vim/commit/4aaf3e7f4db599932d01d87e5bbcdc342cccee27
Diffstat (limited to 'src/nvim/regexp_defs.h')
-rw-r--r-- | src/nvim/regexp_defs.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nvim/regexp_defs.h b/src/nvim/regexp_defs.h index decc832051..09f244c2f6 100644 --- a/src/nvim/regexp_defs.h +++ b/src/nvim/regexp_defs.h @@ -168,4 +168,9 @@ struct regengine { // char_u *expr; }; +// Flags used by vim_regsub() and vim_regsub_both() +#define REGSUB_COPY 1 +#define REGSUB_MAGIC 2 +#define REGSUB_BACKSLASH 4 + #endif // NVIM_REGEXP_DEFS_H |