[jbig2dec] Limit allocations to 1Gbyte. (#3583)

Apparently the maximum memory usage is 2.5Gbyte so a limit of 3Gbyte
is to liberal. Set limit to 1Gbyte to make sure that any extra memory
used by the fuzzer is allowed. 1Gbyte ought to be enough for most real
world images decoded by jbig2dec.
This commit is contained in:
Sebastian Rasmussen 2020-04-06 14:02:59 +08:00 committed by GitHub
parent 1992503e5c
commit 302cf1550b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -26,7 +26,7 @@
#define ALIGNMENT 16
#define MBYTE (1024 * 1024)
#define GBYTE (1024 * MBYTE)
#define MAX_ALLOCATION (3 * GBYTE)
#define MAX_ALLOCATION (1 * GBYTE)
static uint64_t total = 0;
static uint64_t peak = 0;