Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1639)

Unified Diff: core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp

Issue 1417033004: Merge to XFA: Add type cast definitions for CPDF_Name. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp
index 55c62e287801d209010e96757263bfeaf7b5e1b3..cbbfbd719766e71e58814a0a0603b0f00194d419 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp
@@ -332,10 +332,9 @@ FX_BOOL PDF_DataDecode(const uint8_t* src_buf,
{
CPDF_Object* pDecoder =
pDict ? pDict->GetElementValue(FX_BSTRC("Filter")) : NULL;
- if (pDecoder == NULL || (pDecoder->GetType() != PDFOBJ_ARRAY &&
- pDecoder->GetType() != PDFOBJ_NAME)) {
+ if (!pDecoder || (pDecoder->GetType() != PDFOBJ_ARRAY && !pDecoder->IsName()))
return FALSE;
- }
+
CPDF_Object* pParams =
pDict ? pDict->GetElementValue(FX_BSTRC("DecodeParms")) : NULL;
CFX_ByteStringArray DecoderList;

Powered by Google App Engine
This is Rietveld 408576698