summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/aspell/aspell/0001-Fix-various-bugs-found-by-OSS-Fuze.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-support/aspell/aspell/0001-Fix-various-bugs-found-by-OSS-Fuze.patch')
-rw-r--r--meta/recipes-support/aspell/aspell/0001-Fix-various-bugs-found-by-OSS-Fuze.patch56
1 files changed, 56 insertions, 0 deletions
diff --git a/meta/recipes-support/aspell/aspell/0001-Fix-various-bugs-found-by-OSS-Fuze.patch b/meta/recipes-support/aspell/aspell/0001-Fix-various-bugs-found-by-OSS-Fuze.patch
new file mode 100644
index 0000000000..259075b37c
--- /dev/null
+++ b/meta/recipes-support/aspell/aspell/0001-Fix-various-bugs-found-by-OSS-Fuze.patch
@@ -0,0 +1,56 @@
1From 80fa26c74279fced8d778351cff19d1d8f44fe4e Mon Sep 17 00:00:00 2001
2From: Kevin Atkinson <kevina@gnu.org>
3Date: Sun, 4 Aug 2019 04:20:29 -0400
4Subject: [PATCH] Fix various bugs found by OSS-Fuze.
5
6---
7 common/config.cpp | 2 +-
8 common/file_util.cpp | 1 +
9 common/getdata.cpp | 2 +-
10 3 files changed, 3 insertions(+), 2 deletions(-)
11
12Upstream-Status: Backport [https://github.com/GNUAspell/aspell/commit/80fa26c74279fced8d778351cff19d1d8f44fe4e]
13CVE: CVE-2019-17544
14Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
15
16diff --git a/common/config.cpp b/common/config.cpp
17index 017e741..e117d3c 100644
18--- a/common/config.cpp
19+++ b/common/config.cpp
20@@ -763,7 +763,7 @@ namespace acommon {
21 }
22 res.append(':');
23 }
24- if (res.back() == ':') res.pop_back();
25+ if (!res.empty() && res.back() == ':') res.pop_back();
26 }
27
28 struct ListAddHelper : public AddableContainer
29diff --git a/common/file_util.cpp b/common/file_util.cpp
30index 8515832..56ea501 100644
31--- a/common/file_util.cpp
32+++ b/common/file_util.cpp
33@@ -181,6 +181,7 @@ namespace acommon {
34 while ( (dir = els.next()) != 0 )
35 {
36 path = dir;
37+ if (path.empty()) continue;
38 if (path.back() != '/') path += '/';
39 unsigned dir_len = path.size();
40 path += filename;
41diff --git a/common/getdata.cpp b/common/getdata.cpp
42index 7e822c9..1b04823 100644
43--- a/common/getdata.cpp
44+++ b/common/getdata.cpp
45@@ -64,7 +64,7 @@ namespace acommon {
46 char * unescape(char * dest, const char * src)
47 {
48 while (*src) {
49- if (*src == '\\') {
50+ if (*src == '\\' && src[1]) {
51 ++src;
52 switch (*src) {
53 case 'n': *dest = '\n'; break;
54--
552.17.1
56