]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
repo_apk: move entry size limit to the top of the file
authorMichael Schroeder <mls@suse.de>
Tue, 5 Aug 2025 09:59:35 +0000 (11:59 +0200)
committerMichael Schroeder <mls@suse.de>
Tue, 5 Aug 2025 09:59:35 +0000 (11:59 +0200)
ext/repo_apk.c

index ec151591b8fdb42f630c0e3490b437badd6a8c84..7332e8b1041e76b84339e7022ba7cc2b142a27bc 100644 (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;