]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
Bump debian control.tar size limit 273/head
authorDan Nicholson <nicholson@endlessm.com>
Thu, 21 Jun 2018 16:51:55 +0000 (11:51 -0500)
committerDan Nicholson <nicholson@endlessm.com>
Thu, 21 Jun 2018 16:57:02 +0000 (11:57 -0500)
Increase the arbitrary control.tar limit from 1 MB to 16 MB. We came
across an openjdk-7-jdk package that had a 2.4MB control.tar.gz and
libsolv failed to parse it. dpkg doesn't actually apply a limit to these
files.

ext/repo_deb.c

index 277e65ae1af658e858946873ad6e78f2674a3dfa..6af7f105bf3e7355572f079841eb9d28087a648f 100644 (file)
@@ -599,8 +599,11 @@ repo_add_deb(Repo *repo, const char *deb, int flags)
       fclose(fp);
       return 0;
     }
+  /* dpkg has no actual maximum size for the control.tar member, so this
+   * just keeps from allocating arbitrarily large amounts of memory.
+   */
   clen = atoi((char *)buf + 8 + 60 + vlen + 48);
-  if (clen <= 0 || clen >= 0x100000)
+  if (clen <= 0 || clen >= 0x1000000)
     {
       pool_error(pool, -1, "%s: control.tar has illegal size", deb);
       fclose(fp);