From 182d129bcee8f7731b9bbfde0064295ad3b37271 Mon Sep 17 00:00:00 2001 From: Oliver Chang Date: Thu, 12 Nov 2015 10:43:27 -0800 Subject: Clear decoders after the image decoder in the /Filter array. During decoding, when an image decoder is encountered, any subsequent decoders are ignored, but remain in the array. However, later on CPDF_DIBSource::ValidateDictParam expects the image decoder to be the last in the array, causing issues. A check is also added in CPDF_DIBSource::GetScanline to ensure that the calculated pitch value is <= the (4-aligned) pitch value in the cached bitmap to prevent future issues. Also cleans up some NULL usages. BUG=552046 R=jun_fang@foxitsoftware.com, tsepez@chromium.org Review URL: https://codereview.chromium.org/1406943005 . --- core/include/fpdfapi/fpdf_objects.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/include/fpdfapi') diff --git a/core/include/fpdfapi/fpdf_objects.h b/core/include/fpdfapi/fpdf_objects.h index 11589e65a2..b754ab2b2b 100644 --- a/core/include/fpdfapi/fpdf_objects.h +++ b/core/include/fpdfapi/fpdf_objects.h @@ -323,7 +323,7 @@ class CPDF_Array : public CPDF_Object { CPDF_Object* pObj, CPDF_IndirectObjects* pObjs = NULL); - void RemoveAt(FX_DWORD index); + void RemoveAt(FX_DWORD index, int nCount = 1); void Add(CPDF_Object* pObj, CPDF_IndirectObjects* pObjs = NULL); -- cgit v1.2.3