cherry-pick Bump debian control.tar size limit
[services/perl-BSSolv-obs-2.7.git] / libsolv-0.6.15 / ext / repo_deb.c
index 277e65a..6af7f10 100755 (executable)
@@ -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);