diff options
Diffstat (limited to 'meta/recipes-devtools/rpm/rpm/fprint-pointer-fix.patch')
-rw-r--r-- | meta/recipes-devtools/rpm/rpm/fprint-pointer-fix.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/meta/recipes-devtools/rpm/rpm/fprint-pointer-fix.patch b/meta/recipes-devtools/rpm/rpm/fprint-pointer-fix.patch new file mode 100644 index 0000000000..87a92eb9a1 --- /dev/null +++ b/meta/recipes-devtools/rpm/rpm/fprint-pointer-fix.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | Upstream-Status: Submitted | ||
2 | |||
3 | From: Qing He <qing.he@intel.com> | ||
4 | Subject: [PATCH] rpm 5.4.0: Fix pointer mishandling | ||
5 | |||
6 | In fpLookupSubdir, data returned by hash should be of type | ||
7 | "struct rpmffi_s **" instead of "struct rpmffi_s *" to avoid | ||
8 | segfault. | ||
9 | |||
10 | Signed-off-by: Qing He <qing.he@intel.com> | ||
11 | |||
12 | diff --git a/rpmdb/fprint.c b/rpmdb/fprint.c | ||
13 | index 0e76148..82b8f45 100644 | ||
14 | --- a/rpmdb/fprint.c | ||
15 | +++ b/rpmdb/fprint.c | ||
16 | @@ -333,7 +333,7 @@ restart: | ||
17 | *te = '\0'; | ||
18 | |||
19 | while (te < se) { | ||
20 | - struct rpmffi_s * recs; | ||
21 | + struct rpmffi_s ** recs; | ||
22 | int numRecs; | ||
23 | int i; | ||
24 | |||
25 | @@ -346,8 +346,8 @@ restart: | ||
26 | const char * link; | ||
27 | int fx; | ||
28 | |||
29 | - fx = recs[i].fileno; | ||
30 | - fi = recs[i].p->fi; | ||
31 | + fx = recs[i]->fileno; | ||
32 | + fi = recs[i]->p->fi; | ||
33 | flink = fi->flinks[fx]; | ||
34 | if (!(flink && *flink != '\0')) | ||
35 | continue; | ||