diff options
author | Leon Scroggins III <scroggo@google.com> | 2018-08-28 08:26:34 -0400 |
---|---|---|
committer | Leon Scroggins III <scroggo@google.com> | 2018-08-28 08:33:07 -0400 |
commit | 34e8fe047921fa8fb04cd6fd600a00e8dc6a6385 (patch) | |
tree | 95dcf6b72b9e5af3290852bae26cdd3d78e3743c | |
parent | 62f5255389a91db9332ca2a1946ce8ab2a594d44 (diff) | |
download | libpng-34e8fe047921fa8fb04cd6fd600a00e8dc6a6385.tar.gz |
Undefine PNG_READ_OPT_PLTE_SUPPORTED
Bug: 113211371
Test: not feasible - this prevents out of bounds read
With PNG_READ_OPT_PLTE_SUPPORTED defined, a PLTE chunk following a tRNS
chunk will negate the tRNS chunk for an image which is not paletted. The
result is that we may read out of bounds.
Change-Id: I4c6032e077b220f8349ab9e7c4102c460d1a7ea2
-rw-r--r-- | README.android | 3 | ||||
-rw-r--r-- | pnglibconf.h | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/README.android b/README.android index 80e837e61..5f94dc96e 100644 --- a/README.android +++ b/README.android @@ -10,4 +10,5 @@ be listed here: (2) pnglibconf.h This is copied from scripts/pnglibconf.h.prebuilt. - Android has undefined PNG_WARNINGS_SUPPORTED. + Android has undefined PNG_WARNINGS_SUPPORTED and + PNG_READ_OPT_PLTE_SUPPORTED. diff --git a/pnglibconf.h b/pnglibconf.h index 366cdc64c..32e60aa14 100644 --- a/pnglibconf.h +++ b/pnglibconf.h @@ -65,7 +65,7 @@ #define PNG_READ_INT_FUNCTIONS_SUPPORTED #define PNG_READ_INVERT_ALPHA_SUPPORTED #define PNG_READ_INVERT_SUPPORTED -#define PNG_READ_OPT_PLTE_SUPPORTED +/*#undef PNG_READ_OPT_PLTE_SUPPORTED*/ #define PNG_READ_PACKSWAP_SUPPORTED #define PNG_READ_PACK_SUPPORTED #define PNG_READ_QUANTIZE_SUPPORTED |