cherry-pick.FILE5_30-39-geb973428.limit-memory-usage-more-to-satisfy-oss-fuzz.patch 501 B

12345678910111213141516
  1. Subject: Limit memory usage more to satisfy oss-fuzz
  2. Origin: FILE5_30-39-geb973428
  3. Upstream-Author: Christos Zoulas <christos@zoulas.com>
  4. Date: Fri Apr 7 15:07:31 2017 +0000
  5. --- a/src/cdf.c
  6. +++ b/src/cdf.c
  7. @@ -408,7 +408,7 @@
  8. if (h->h_master_sat[i] == CDF_SECID_FREE)
  9. break;
  10. -#define CDF_SEC_LIMIT (UINT32_MAX / (4 * ss))
  11. +#define CDF_SEC_LIMIT (UINT32_MAX / (8 * ss))
  12. if ((nsatpersec > 0 &&
  13. h->h_num_sectors_in_master_sat > CDF_SEC_LIMIT / nsatpersec) ||
  14. i > CDF_SEC_LIMIT) {