1
0
mirror of https://github.com/openSUSE/libsolv.git synced 2026-02-05 12:45:46 +01:00

repo_apk: move entry size limit to the top of the file

This commit is contained in:
Michael Schroeder
2025-08-05 11:59:35 +02:00
parent 39324fcf28
commit f8a299cd63

View File

@@ -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;