commit | 4aaf3e7f4db599932d01d87e5bbcdc342cccee27 | [log] [tgz] |
---|---|---|
author | Bram Moolenaar <Bram@vim.org> | Mon May 30 20:58:55 2022 +0100 |
committer | Bram Moolenaar <Bram@vim.org> | Mon May 30 20:58:55 2022 +0100 |
tree | 951e0288738fd50c88a74c94a8ddb8d899985b51 | |
parent | 10db31f9493425a20f1e53d0f214e621f16d65de [diff] [blame] |
patch 8.2.5046: vim_regsub() can overwrite the destination Problem: vim_regsub() can overwrite the destination. Solution: Pass the destination length, give an error when it doesn't fit.
diff --git a/src/regexp.h b/src/regexp.h index c2a15b0..304c82d 100644 --- a/src/regexp.h +++ b/src/regexp.h
@@ -177,4 +177,9 @@ //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 // _REGEXP_H