summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/cpdfsdk_helpers.cpp5
-rw-r--r--fpdfsdk/fpdf_ppo.cpp2
2 files changed, 4 insertions, 3 deletions
diff --git a/fpdfsdk/cpdfsdk_helpers.cpp b/fpdfsdk/cpdfsdk_helpers.cpp
index 1b90497456..5498909c32 100644
--- a/fpdfsdk/cpdfsdk_helpers.cpp
+++ b/fpdfsdk/cpdfsdk_helpers.cpp
@@ -330,8 +330,9 @@ unsigned long DecodeStreamMaybeCopyAndReturnLength(const CPDF_Stream* stream,
ASSERT(stream);
uint8_t* data = stream->GetRawData();
uint32_t len = stream->GetRawSize();
- CPDF_Dictionary* dict = stream->GetDict();
- CPDF_Object* decoder = dict ? dict->GetDirectObjectFor("Filter") : nullptr;
+ const CPDF_Dictionary* dict = stream->GetDict();
+ const CPDF_Object* decoder =
+ dict ? dict->GetDirectObjectFor("Filter") : nullptr;
if (decoder && (decoder->IsArray() || decoder->IsName())) {
// Decode the stream if one or more stream filters are specified.
uint8_t* decoded_data = nullptr;
diff --git a/fpdfsdk/fpdf_ppo.cpp b/fpdfsdk/fpdf_ppo.cpp
index c3b6402a97..bf8ed25af0 100644
--- a/fpdfsdk/fpdf_ppo.cpp
+++ b/fpdfsdk/fpdf_ppo.cpp
@@ -168,7 +168,7 @@ const CPDF_Object* PageDictGetInheritableTag(const CPDF_Dictionary* pDict,
CFX_FloatRect GetMediaBox(const CPDF_Dictionary* pPageDict) {
const CPDF_Object* pMediaBox =
PageDictGetInheritableTag(pPageDict, "MediaBox");
- CPDF_Array* pArray = ToArray(pMediaBox->GetDirect());
+ const CPDF_Array* pArray = ToArray(pMediaBox->GetDirect());
if (!pArray)
return CFX_FloatRect();
return pArray->GetRect();