Skip to content

Commit f8a299c

Browse files
committed
repo_apk: move entry size limit to the top of the file
1 parent 39324fc commit f8a299c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

ext/repo_apk.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
#include "repo_apk.h"
2727
#include "repo_apkv3.h"
2828

29+
#define MAX_ENTRY_SIZE 0x1000000
30+
2931
static inline ssize_t
3032
apk_fillbuf(unsigned char *buf, size_t count, int fd, FILE *fp)
3133
{
@@ -453,7 +455,7 @@ repo_add_apk_pkg(Repo *repo, const char *fn, int flags)
453455
tarhead_skip(&th);
454456
continue;
455457
}
456-
if (th.length > 10 * 1024 * 1024)
458+
if (th.length >= MAX_ENTRY_SIZE)
457459
{
458460
pool_error(pool, -1, "%s: oversized .PKGINFO", fn);
459461
break;

0 commit comments

Comments
 (0)