blob: 4a4e5cba25125bc3173f468645c4e9a75ce2a054 [file] [log] [blame]
Brad Bishopd7bf8c12018-02-25 22:55:05 -05001From 1c4c935cb73ac1ccb9693df1a51ba218a22e8ca8 Mon Sep 17 00:00:00 2001
2From: Ming Liu <liu.ming50@gmail.com>
3Date: Sat, 30 Sep 2017 11:15:16 +0800
4Subject: [PATCH] repo_rpmdb.c: increase MAX_HDR_CNT and MAX_HDR_DSIZE
5
6Upstream-Status: Submitted [https://github.com/openSUSE/libsolv/pull/230]
7
8We encountered 'corrupt rpm' issues when installing extreme big RPM
9packages like the kernel-devsrc package of Yocto project.
10
11It can be fixed by increasing MAX_HDR_CNT and MAX_HDR_DSIZE per test.
12
13Signed-off-by: Ming Liu <liu.ming50@gmail.com>
14---
15 ext/repo_rpmdb.c | 4 ++--
16 1 file changed, 2 insertions(+), 2 deletions(-)
17
18diff --git a/ext/repo_rpmdb.c b/ext/repo_rpmdb.c
19index c7000a9..7000835 100644
20--- a/ext/repo_rpmdb.c
21+++ b/ext/repo_rpmdb.c
22@@ -170,8 +170,8 @@
23 #define MAX_SIG_CNT 0x100000
24 #define MAX_SIG_DSIZE 0x100000
25
26-#define MAX_HDR_CNT 0x100000
27-#define MAX_HDR_DSIZE 0x2000000
28+#define MAX_HDR_CNT 0x200000
29+#define MAX_HDR_DSIZE 0x4000000
30
31 typedef struct rpmhead {
32 int cnt;
33--
342.7.4
35