Skip to content

Commit

Permalink
Reduced the max memory use and image size in 64-bit builds
Browse files Browse the repository at this point in the history
This is a stopgap measure that should prevent some problems with excessive
resource use, and possibly integer overflow.
Related: issue #14
  • Loading branch information
jsummers committed Apr 12, 2017
1 parent bb321cf commit 8656405
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/imagew-internals.h
Expand Up @@ -19,8 +19,8 @@
typedef double iw_tmpsample;

#ifdef IW_64BIT
#define IW_DEFAULT_MAX_DIMENSION 1000000
#define IW_DEFAULT_MAX_MALLOC 2000000000000
#define IW_DEFAULT_MAX_DIMENSION 40000
#define IW_DEFAULT_MAX_MALLOC 2000000000
#else
#define IW_DEFAULT_MAX_DIMENSION 40000 // Must be less than sqrt(2^31).
#define IW_DEFAULT_MAX_MALLOC 2000000000
Expand Down

0 comments on commit 8656405

Please sign in to comment.