From: Michael Schroeder Date: Tue, 5 Aug 2025 09:59:35 +0000 (+0200) Subject: repo_apk: move entry size limit to the top of the file X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f8a299cd6317f86b2ea949d5c1edbfeb40f8be61;p=thirdparty%2Flibsolv.git repo_apk: move entry size limit to the top of the file --- diff --git a/ext/repo_apk.c b/ext/repo_apk.c index ec151591..7332e8b1 100644 --- a/ext/repo_apk.c +++ b/ext/repo_apk.c @@ -26,6 +26,8 @@ #include "repo_apk.h" #include "repo_apkv3.h" +#define MAX_ENTRY_SIZE 0x1000000 + static inline ssize_t apk_fillbuf(unsigned char *buf, size_t count, int fd, FILE *fp) { @@ -453,7 +455,7 @@ repo_add_apk_pkg(Repo *repo, const char *fn, int flags) tarhead_skip(&th); continue; } - if (th.length > 10 * 1024 * 1024) + if (th.length >= MAX_ENTRY_SIZE) { pool_error(pool, -1, "%s: oversized .PKGINFO", fn); break;