summaryrefslogtreecommitdiff
path: root/lib/libalpm/pkghash.h
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2018-01-07 19:30:42 -0500
committerAllan McRae <allan@archlinux.org>2018-01-10 10:52:26 +1000
commit2bda849bf9b39b423175d1ee1d8796b856cc9988 (patch)
tree457191f5eae040c3c37b152fe14dab275ff4c0af /lib/libalpm/pkghash.h
parent59b6fdeee1722a58d1599bcbd1e2c0fc33debc99 (diff)
downloadpacman-2bda849bf9b39b423175d1ee1d8796b856cc9988.tar.xz
detect pkghash allocation failure
If rehash ever failed with a full hash it would return the old hash that is already full. get_hash_position would then loop forever because it would never find an empty bucket. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib/libalpm/pkghash.h')
-rw-r--r--lib/libalpm/pkghash.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libalpm/pkghash.h b/lib/libalpm/pkghash.h
index dd163346..a5c02c19 100644
--- a/lib/libalpm/pkghash.h
+++ b/lib/libalpm/pkghash.h
@@ -49,8 +49,8 @@ typedef struct __alpm_pkghash_t alpm_pkghash_t;
alpm_pkghash_t *_alpm_pkghash_create(unsigned int size);
-alpm_pkghash_t *_alpm_pkghash_add(alpm_pkghash_t *hash, alpm_pkg_t *pkg);
-alpm_pkghash_t *_alpm_pkghash_add_sorted(alpm_pkghash_t *hash, alpm_pkg_t *pkg);
+alpm_pkghash_t *_alpm_pkghash_add(alpm_pkghash_t **hash, alpm_pkg_t *pkg);
+alpm_pkghash_t *_alpm_pkghash_add_sorted(alpm_pkghash_t **hash, alpm_pkg_t *pkg);
alpm_pkghash_t *_alpm_pkghash_remove(alpm_pkghash_t *hash, alpm_pkg_t *pkg, alpm_pkg_t **data);
void _alpm_pkghash_free(alpm_pkghash_t *hash);