summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/be_local.c
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2015-01-21 05:27:25 +0100
committerAllan McRae <allan@archlinux.org>2015-01-21 05:27:25 +0100
commit92febc847cf60b12706c64e4786dae909a9396ac (patch)
tree44771538071061e92efb011e7150ac7c788a6d60 /lib/libalpm/be_local.c
parent018fa2b48c95492312ff3830b368a1f6036d6cf6 (diff)
parentc6263da168f7d612ea221e868fe42ad2ed706fa9 (diff)
downloadpacman-92febc847cf60b12706c64e4786dae909a9396ac.tar.gz
pacman-92febc847cf60b12706c64e4786dae909a9396ac.tar.xz
Merge branch 'maint'
Diffstat (limited to 'lib/libalpm/be_local.c')
-rw-r--r--lib/libalpm/be_local.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libalpm/be_local.c b/lib/libalpm/be_local.c
index 2454cdcb..300660b6 100644
--- a/lib/libalpm/be_local.c
+++ b/lib/libalpm/be_local.c
@@ -789,7 +789,7 @@ static int local_db_read(alpm_pkg_t *info, alpm_dbinfrq_t inforeq)
while(safe_fgets(line, sizeof(line), fp) &&
(len = _alpm_strip_newline(line, 0))) {
if(!_alpm_greedy_grow((void **)&files, &files_size,
- (files_size ? files_size + sizeof(alpm_file_t) : 8 * sizeof(alpm_file_t)))) {
+ (files_count ? (files_count + 1) * sizeof(alpm_file_t) : 8 * sizeof(alpm_file_t)))) {
goto error;
}
/* since we know the length of the file string already,