Skip to content

Commit

Permalink
Bug 1283961 - Part 1: Remove limits on PNG image dimensions (libpng).…
Browse files Browse the repository at this point in the history
… r=seth
  • Loading branch information
glennrp committed Jul 21, 2016
1 parent b7dea8f commit 56bdb07
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions media/libpng/pnglibconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@
#ifndef PNGLCONF_H
#define PNGLCONF_H

/* limit image dimensions (bug #251381, #591822, and #967656) */
#ifndef MOZ_PNG_MAX_DIMENSION
# define MOZ_PNG_MAX_DIMENSION 32767
/* Limit image dimensions (bug #251381, #591822, #967656, and #1283961) */
#ifndef MOZ_PNG_MAX_WIDTH
# define MOZ_PNG_MAX_WIDTH 0x7fffffffL /* Unlimited */
#endif
#ifndef MOZ_PNG_MAX_HEIGHT
# define MOZ_PNG_MAX_HEIGHT 0x7fffffffL /* Unlimited */
#endif

#define PNG_API_RULE 0
Expand All @@ -23,8 +26,8 @@
#define PNG_sRGB_PROFILE_CHECKS -1
#define PNG_USER_CHUNK_CACHE_MAX 128
#define PNG_USER_CHUNK_MALLOC_MAX 4000000L
#define PNG_USER_HEIGHT_MAX MOZ_PNG_MAX_DIMENSION
#define PNG_USER_WIDTH_MAX MOZ_PNG_MAX_DIMENSION
#define PNG_USER_HEIGHT_MAX MOZ_PNG_MAX_WIDTH
#define PNG_USER_WIDTH_MAX MOZ_PNG_MAX_HEIGHT
#define PNG_WEIGHT_SHIFT 8
#define PNG_ZBUF_SIZE 8192
#define PNG_Z_DEFAULT_COMPRESSION (-1)
Expand Down

0 comments on commit 56bdb07

Please sign in to comment.