Fix #30 (segment fault in xbps-rindex)

This commit is contained in:
Juan RP
2014-01-22 11:53:08 +01:00
parent 7f5bd2f8a3
commit c03505b13e
3 changed files with 6 additions and 1 deletions

View File

@ -65,6 +65,9 @@ repo_get_dict(struct xbps_repo *repo)
size_t size;
int rv;
if (repo->ar == NULL)
return NULL;
rv = archive_read_next_header(repo->ar, &entry);
if (rv != ARCHIVE_OK) {
xbps_dbg_printf(repo->xhp,