40dcc1ce53
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
28 lines
921 B
Diff
28 lines
921 B
Diff
From 599c58bed474c2a68109ff0649f1effa7ff02c45 Mon Sep 17 00:00:00 2001
|
|
From: Michael Schroeder <mls@suse.de>
|
|
Date: Tue, 17 May 2016 11:22:56 +0200
|
|
Subject: [PATCH] Fix order of solv_extend arguments in repo_add_rpmmd
|
|
|
|
Fixes libsolv sometimes segfaulting since commit
|
|
d06562f7b70f6ceb7d52e717efd1963ce6e8ecf0
|
|
---
|
|
ext/repo_rpmmd.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/ext/repo_rpmmd.c b/ext/repo_rpmmd.c
|
|
index 78264cc..d280ba0 100644
|
|
--- a/ext/repo_rpmmd.c
|
|
+++ b/ext/repo_rpmmd.c
|
|
@@ -657,7 +657,7 @@ put_in_cshash(struct parsedata *pd, const unsigned char *key, int keyl, Id id)
|
|
}
|
|
}
|
|
/* a new entry. put in csdata */
|
|
- pd->csdata = solv_extend(pd->csdata, pd->ncsdata, 1, 1 + keyl + sizeof(Id), 4095);
|
|
+ pd->csdata = solv_extend(pd->csdata, pd->ncsdata, 1 + keyl + sizeof(Id), 1, 4095);
|
|
d = pd->csdata + pd->ncsdata;
|
|
d[0] = keyl - 1;
|
|
memcpy(d + 1, key, keyl);
|
|
--
|
|
2.7.4
|
|
|