summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/libsolv/libsolv/0001-repo_rpmdb.c-increase-MAX_HDR_CNT-and-MAX_HDR_DSIZE.patch
blob: 4a4e5cba25125bc3173f468645c4e9a75ce2a054 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
From 1c4c935cb73ac1ccb9693df1a51ba218a22e8ca8 Mon Sep 17 00:00:00 2001
From: Ming Liu <liu.ming50@gmail.com>
Date: Sat, 30 Sep 2017 11:15:16 +0800
Subject: [PATCH] repo_rpmdb.c: increase MAX_HDR_CNT and MAX_HDR_DSIZE

Upstream-Status: Submitted [https://github.com/openSUSE/libsolv/pull/230]

We encountered 'corrupt rpm' issues when installing extreme big RPM
packages like the kernel-devsrc package of Yocto project.

It can be fixed by increasing MAX_HDR_CNT and MAX_HDR_DSIZE per test.

Signed-off-by: Ming Liu <liu.ming50@gmail.com>
---
 ext/repo_rpmdb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ext/repo_rpmdb.c b/ext/repo_rpmdb.c
index c7000a9..7000835 100644
--- a/ext/repo_rpmdb.c
+++ b/ext/repo_rpmdb.c
@@ -170,8 +170,8 @@
 #define MAX_SIG_CNT		0x100000
 #define MAX_SIG_DSIZE		0x100000
 
-#define MAX_HDR_CNT		0x100000
-#define MAX_HDR_DSIZE		0x2000000
+#define MAX_HDR_CNT		0x200000
+#define MAX_HDR_DSIZE		0x4000000
 
 typedef struct rpmhead {
   int cnt;
-- 
2.7.4