From 5d36673e124b7edf3612988b4f8ed322f03baa65 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Mon, 17 Apr 2023 10:15:36 -0400 Subject: ustar: Don't read sought file --- (limited to 'src') diff --git a/src/ustar.c b/src/ustar.c index a77dace..21d41eb 100644 --- a/src/ustar.c +++ b/src/ustar.c @@ -146,16 +146,16 @@ opkg_opk_ustar_seek(struct opkg_opk_ustar *ustar, const char *member) name[sizeof(header.name)] = '\0'; } + if (strcmp((char *) name, member) == 0) { + return OPKG_OPK_OK; /* Member found */ + } + while (ustar->data_size_remaining > 0) { if (opkg_opk_ustar_read(ustar, NULL, NULL) == OPKG_OPK_ERROR) { return OPKG_OPK_ERROR; } } - - if (strcmp((char *) name, member) == 0) { - return OPKG_OPK_OK; /* Member found */ - } } return OPKG_OPK_ERROR; /* Member not found */ -- cgit v0.9.1