diff options
author | Leo <thinkabit.ukim@gmail.com> | 2019-10-24 09:24:05 -0300 |
---|---|---|
committer | Kevin Daudt <kdaudt@alpinelinux.org> | 2019-10-31 16:40:26 +0000 |
commit | b536611ee6298539033c380cc5f69a7e7a433e8e (patch) | |
tree | bf01970caf054cf568c266c1def4cb807ef7610b /main/aspell/CVE-2019-17544.patch | |
parent | 10154706bf344955d0bcd1e5ecb1ef7a7aeec2e5 (diff) | |
download | aports-b536611ee6298539033c380cc5f69a7e7a433e8e.tar.gz aports-b536611ee6298539033c380cc5f69a7e7a433e8e.tar.bz2 aports-b536611ee6298539033c380cc5f69a7e7a433e8e.tar.xz |
main/aspell: fix CVE-2019-17544
ref #10898
Closes !773
Diffstat (limited to 'main/aspell/CVE-2019-17544.patch')
-rw-r--r-- | main/aspell/CVE-2019-17544.patch | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/main/aspell/CVE-2019-17544.patch b/main/aspell/CVE-2019-17544.patch new file mode 100644 index 0000000000..5bdb439151 --- /dev/null +++ b/main/aspell/CVE-2019-17544.patch @@ -0,0 +1,39 @@ +diff --git a/common/config.cpp b/common/config.cpp +index b1e919b..51486a7 100644 +--- a/common/config.cpp ++++ b/common/config.cpp +@@ -763,7 +763,7 @@ namespace acommon { + } + res.append(':'); + } +- if (res.back() == ':') res.pop_back(); ++ if (!res.empty() && res.back() == ':') res.pop_back(); + } + + struct ListAddHelper : public AddableContainer +diff --git a/common/file_util.cpp b/common/file_util.cpp +index 8515832..56ea501 100644 +--- a/common/file_util.cpp ++++ b/common/file_util.cpp +@@ -181,6 +181,7 @@ namespace acommon { + while ( (dir = els.next()) != 0 ) + { + path = dir; ++ if (path.empty()) continue; + if (path.back() != '/') path += '/'; + unsigned dir_len = path.size(); + path += filename; +diff --git a/common/getdata.cpp b/common/getdata.cpp +index 7e822c9..1b04823 100644 +--- a/common/getdata.cpp ++++ b/common/getdata.cpp +@@ -64,7 +64,7 @@ namespace acommon { + char * unescape(char * dest, const char * src) + { + while (*src) { +- if (*src == '\\') { ++ if (*src == '\\' && src[1]) { + ++src; + switch (*src) { + case 'n': *dest = '\n'; break; + |