summaryrefslogtreecommitdiff
path: root/Utilities/cmlibarchive/libarchive/archive_entry_link_resolver.c
diff options
context:
space:
mode:
Diffstat (limited to 'Utilities/cmlibarchive/libarchive/archive_entry_link_resolver.c')
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_entry_link_resolver.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Utilities/cmlibarchive/libarchive/archive_entry_link_resolver.c b/Utilities/cmlibarchive/libarchive/archive_entry_link_resolver.c
index a18144dd5..c7d59497a 100644
--- a/Utilities/cmlibarchive/libarchive/archive_entry_link_resolver.c
+++ b/Utilities/cmlibarchive/libarchive/archive_entry_link_resolver.c
@@ -244,6 +244,9 @@ archive_entry_linkify(struct archive_entry_linkresolver *res,
* for future use.
*/
le = insert_entry(res, *e);
+ if (le == NULL)
+ /* XXX We should return an error code XXX */
+ return;
le->entry = *e;
*e = NULL;
}
@@ -362,7 +365,7 @@ insert_entry(struct archive_entry_linkresolver *res,
if (res->number_entries > res->number_buckets * 2)
grow_hash(res);
- hash = archive_entry_dev(entry) ^ archive_entry_ino64(entry);
+ hash = (size_t)(archive_entry_dev(entry) ^ archive_entry_ino64(entry));
bucket = hash & (res->number_buckets - 1);
/* If we could allocate the entry, record it. */