summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/opk.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/opk.c b/src/opk.c
index 94d6c2b..f98f088 100644
--- a/src/opk.c
+++ b/src/opk.c
@@ -194,9 +194,10 @@ static int
_opkg_opk_opk_read_control(struct opkg_opk_opk *opk)
{
struct opkg_opk_ustar_member *member;
+ int ret_list;
+ int ret_read;
char *buffer;
size_t size;
- int ret_read;
struct _opkg_opk_opk_seek_name *seek_name;
if (opk->print_control_head == NULL) {
@@ -208,7 +209,8 @@ _opkg_opk_opk_read_control(struct opkg_opk_opk *opk)
return OPKG_OPK_ERROR;
}
- while (opkg_opk_ustar_list(opk->inner_ustar, &member) == OPKG_OPK_OK) {
+ while ((ret_list = opkg_opk_ustar_list(opk->inner_ustar, &member)) ==
+ OPKG_OPK_OK) {
if (_opkg_opk_opk_check_name(member->name,
&opk->print_control_head,
&opk->print_control_tail) !=
@@ -239,6 +241,11 @@ _opkg_opk_opk_read_control(struct opkg_opk_opk *opk)
}
opk->previously_printed = 1;
}
+ if (ret_list == OPKG_OPK_ERROR) {
+ fputs(_("Error: Failed to list control files\n"), stderr);
+ _opkg_opk_opk_free_inner(opk);
+ return OPKG_OPK_ERROR;
+ }
/* Check for files not found. */
if (opk->print_control_head != NULL) {