blob: 14e5210751cc2c52cee087309375361ff22f384c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
From: Markus Koschany <apo@debian.org>
Date: Sun, 30 Oct 2022 20:51:31 +0100
Subject: CVE-2022-0685
Origin: https://github.com/vim/vim/commit/5921aeb5741fc6e84c870d68c7c35b93ad0c9f87
---
src/charset.c | 6 ++++++
src/proto/charset.pro | 2 +-
src/testdir/test_autochdir.vim | 9 +++++++++
src/version.c | 2 ++
4 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/src/charset.c b/src/charset.c
index 1fbbaee..427686d 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -1672,6 +1672,12 @@ vim_isupper(int c)
return isupper(c);
}
+ int
+vim_isalpha(int c)
+{
+ return vim_islower(c) || vim_isupper(c);
+}
+
int
vim_toupper(int c)
{
diff --git a/src/proto/charset.pro b/src/proto/charset.pro
index bb4132f..c078ff6 100644
--- a/src/proto/charset.pro
+++ b/src/proto/charset.pro
@@ -48,6 +48,7 @@ int vim_isxdigit(int c);
int vim_isbdigit(int c);
int vim_islower(int c);
int vim_isupper(int c);
+int vim_isalpha(int c);
int vim_toupper(int c);
int vim_tolower(int c);
char_u *skiptowhite(char_u *p);
@@ -60,5 +61,4 @@ int hexhex2nr(char_u *p);
int rem_backslash(char_u *str);
void backslash_halve(char_u *p);
char_u *backslash_halve_save(char_u *p);
-void ebcdic2ascii(char_u *buffer, int len);
/* vim: set ft=c : */
|