diff options
Diffstat (limited to 'meta/recipes-extended/libsolv/libsolv/0009-Don-t-set-values-that-are-never-read.patch')
-rw-r--r-- | meta/recipes-extended/libsolv/libsolv/0009-Don-t-set-values-that-are-never-read.patch | 113 |
1 files changed, 113 insertions, 0 deletions
diff --git a/meta/recipes-extended/libsolv/libsolv/0009-Don-t-set-values-that-are-never-read.patch b/meta/recipes-extended/libsolv/libsolv/0009-Don-t-set-values-that-are-never-read.patch new file mode 100644 index 0000000000..8b4a993d22 --- /dev/null +++ b/meta/recipes-extended/libsolv/libsolv/0009-Don-t-set-values-that-are-never-read.patch | |||
@@ -0,0 +1,113 @@ | |||
1 | From edf87c92cf59c2eed9c1e33c51a47163da15d90b Mon Sep 17 00:00:00 2001 | ||
2 | From: Jaroslav Rohel <jrohel@redhat.com> | ||
3 | Date: Tue, 11 Dec 2018 12:58:34 +0100 | ||
4 | Subject: [PATCH] Don't set values that are never read | ||
5 | Reply-To: muislam@microsoft.com | ||
6 | |||
7 | CVE: CVE-2018-20532 CVE-2018-20533 CVE-2018-20534 | ||
8 | |||
9 | Upstream-Status: Backport | ||
10 | |||
11 | Signed-off-by: Muminul Islam <muislam@microsoft.com> | ||
12 | |||
13 | Cherry picked from https://github.com/openSUSE/libsolv/pull/291/commits | ||
14 | --- | ||
15 | ext/pool_fileconflicts.c | 1 - | ||
16 | ext/repo_appdata.c | 2 +- | ||
17 | ext/repo_comps.c | 2 +- | ||
18 | src/cleandeps.c | 1 - | ||
19 | src/dirpool.c | 2 +- | ||
20 | src/order.c | 1 - | ||
21 | src/repopage.c | 1 - | ||
22 | 7 files changed, 3 insertions(+), 7 deletions(-) | ||
23 | |||
24 | diff --git a/ext/pool_fileconflicts.c b/ext/pool_fileconflicts.c | ||
25 | index eaeb52b2..2fd3d540 100644 | ||
26 | --- a/ext/pool_fileconflicts.c | ||
27 | +++ b/ext/pool_fileconflicts.c | ||
28 | @@ -590,7 +590,6 @@ findfileconflicts_alias_cb(void *cbdatav, const char *fn, struct filelistinfo *i | ||
29 | |||
30 | if (!info->dirlen) | ||
31 | return; | ||
32 | - dp = fn + info->dirlen; | ||
33 | if (info->diridx != cbdata->lastdiridx) | ||
34 | { | ||
35 | cbdata->lastdiridx = info->diridx; | ||
36 | diff --git a/ext/repo_appdata.c b/ext/repo_appdata.c | ||
37 | index 62faf2d8..69d46386 100644 | ||
38 | --- a/ext/repo_appdata.c | ||
39 | +++ b/ext/repo_appdata.c | ||
40 | @@ -103,7 +103,7 @@ startElement(struct solv_xmlparser *xmlp, int state, const char *name, const cha | ||
41 | { | ||
42 | struct parsedata *pd = xmlp->userdata; | ||
43 | Pool *pool = pd->pool; | ||
44 | - Solvable *s = pd->solvable; | ||
45 | + Solvable *s; | ||
46 | const char *type; | ||
47 | |||
48 | /* ignore all language tags */ | ||
49 | diff --git a/ext/repo_comps.c b/ext/repo_comps.c | ||
50 | index 255ecb16..e59f8d12 100644 | ||
51 | --- a/ext/repo_comps.c | ||
52 | +++ b/ext/repo_comps.c | ||
53 | @@ -107,7 +107,7 @@ startElement(struct solv_xmlparser *xmlp, int state, const char *name, const cha | ||
54 | { | ||
55 | struct parsedata *pd = xmlp->userdata; | ||
56 | Pool *pool = pd->pool; | ||
57 | - Solvable *s = pd->solvable; | ||
58 | + Solvable *s; | ||
59 | |||
60 | switch(state) | ||
61 | { | ||
62 | diff --git a/src/cleandeps.c b/src/cleandeps.c | ||
63 | index 1da28f6e..b2fde317 100644 | ||
64 | --- a/src/cleandeps.c | ||
65 | +++ b/src/cleandeps.c | ||
66 | @@ -748,7 +748,6 @@ solver_createcleandepsmap(Solver *solv, Map *cleandepsmap, int unneeded) | ||
67 | continue; | ||
68 | if (strncmp(pool_id2str(pool, s->name), "pattern:", 8) != 0) | ||
69 | continue; | ||
70 | - dp = s->repo->idarraydata + s->requires; | ||
71 | for (dp = s->repo->idarraydata + s->requires; *dp; dp++) | ||
72 | FOR_PROVIDES(p, pp, *dp) | ||
73 | if (pool->solvables[p].repo == installed) | ||
74 | diff --git a/src/dirpool.c b/src/dirpool.c | ||
75 | index afb26ea5..bed9435e 100644 | ||
76 | --- a/src/dirpool.c | ||
77 | +++ b/src/dirpool.c | ||
78 | @@ -85,7 +85,7 @@ dirpool_make_dirtraverse(Dirpool *dp) | ||
79 | return; | ||
80 | dp->dirs = solv_extend_resize(dp->dirs, dp->ndirs, sizeof(Id), DIR_BLOCK); | ||
81 | dirtraverse = solv_calloc_block(dp->ndirs, sizeof(Id), DIR_BLOCK); | ||
82 | - for (parent = 0, i = 0; i < dp->ndirs; i++) | ||
83 | + for (i = 0; i < dp->ndirs; i++) | ||
84 | { | ||
85 | if (dp->dirs[i] > 0) | ||
86 | continue; | ||
87 | diff --git a/src/order.c b/src/order.c | ||
88 | index c92c3328..cfde40c9 100644 | ||
89 | --- a/src/order.c | ||
90 | +++ b/src/order.c | ||
91 | @@ -1066,7 +1066,6 @@ transaction_order(Transaction *trans, int flags) | ||
92 | #if 0 | ||
93 | printf("do %s [%d]\n", pool_solvid2str(pool, te->p), temedianr[i]); | ||
94 | #endif | ||
95 | - s = pool->solvables + te->p; | ||
96 | for (j = te->edges; od.invedgedata[j]; j++) | ||
97 | { | ||
98 | struct _TransactionElement *te2 = od.tes + od.invedgedata[j]; | ||
99 | diff --git a/src/repopage.c b/src/repopage.c | ||
100 | index 2b7a863b..85d53eb9 100644 | ||
101 | --- a/src/repopage.c | ||
102 | +++ b/src/repopage.c | ||
103 | @@ -399,7 +399,6 @@ match_done: | ||
104 | litlen -= 32; | ||
105 | } | ||
106 | } | ||
107 | - litofs = 0; | ||
108 | } | ||
109 | return oo; | ||
110 | } | ||
111 | -- | ||
112 | 2.23.0 | ||
113 | |||