diff options
author | Qing He <qing.he@intel.com> | 2011-05-27 17:03:18 +0800 |
---|---|---|
committer | Saul Wold <sgw@linux.intel.com> | 2011-05-27 10:48:28 -0700 |
commit | dd7e260fe374e337a385d1cb8951cb3de8a2c741 (patch) | |
tree | 1f6819f7b854340e750a910a7b0a6317a4789afe /meta/recipes-devtools/rpm/rpm/fprint-pointer-fix.patch | |
parent | 5f76f3b18d5fbd6bb25ebd40ed4e4426764133e7 (diff) | |
download | poky-dd7e260fe374e337a385d1cb8951cb3de8a2c741.tar.gz |
rpm: fix fprint pointer issue
[YOCTO #1030]
(From OE-Core rev: bc4b86639a713c877dbe5e0f984873915d1578d4)
Signed-off-by: Qing He <qing.he@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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; | ||