Bug 987625 - Conditionally define MOZ_PNG_MAX_DIMENSION. r=jrmuizel

This commit is contained in:
Glenn Randers-Pehrson 2014-04-01 09:14:14 -04:00
parent 305d15f8a8
commit 0f9ec1bc43
2 changed files with 8 additions and 1 deletions

View File

@ -46,6 +46,11 @@ GetPNGDecoderAccountingLog()
}
#endif
/* limit image dimensions (bug #251381, #591822, and #967656) */
#ifndef MOZ_PNG_MAX_DIMENSION
# define MOZ_PNG_MAX_DIMENSION 32767
#endif
// For size decodes
#define WIDTH_OFFSET 16
#define HEIGHT_OFFSET (WIDTH_OFFSET + 4)

View File

@ -7,7 +7,9 @@
#define PNGLCONF_H /* So we don't try to use libpng's pnglibconf.h */
/* limit image dimensions (bug #251381, #591822, and #967656) */
#define MOZ_PNG_MAX_DIMENSION 32767
#ifndef MOZ_PNG_MAX_DIMENSION
# define MOZ_PNG_MAX_DIMENSION 32767
#endif
#define PNG_API_RULE 0
#define PNG_COST_SHIFT 3