summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
authorArtem Strygin <art-snake@yandex-team.ru>2018-07-24 10:14:24 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-07-24 10:14:24 +0000
commitaa50728980036f07fda232cea974fd80c89b7cb7 (patch)
tree101e954b24a44f1d818923076695bd25759d6b14 /fpdfsdk
parentc62aa207e9acb919c33df5f3694fe159619dda86 (diff)
downloadpdfium-aa50728980036f07fda232cea974fd80c89b7cb7.tar.xz
Fix encryption dictionary owning.
Return encryption dictionary as const reference from CPDF_Parser. Create a copy in CPDF_Creator if needed. Change-Id: I270f71d307d818fba7f65ebe379f5942ae816934 Reviewed-on: https://pdfium-review.googlesource.com/38390 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Art Snake <art-snake@yandex-team.ru>
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/fpdf_view.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/fpdfsdk/fpdf_view.cpp b/fpdfsdk/fpdf_view.cpp
index 5fdc82af73..c44d582fd0 100644
--- a/fpdfsdk/fpdf_view.cpp
+++ b/fpdfsdk/fpdf_view.cpp
@@ -313,7 +313,7 @@ FPDF_GetSecurityHandlerRevision(FPDF_DOCUMENT document) {
if (!pDoc || !pDoc->GetParser())
return -1;
- CPDF_Dictionary* pDict = pDoc->GetParser()->GetEncryptDict();
+ const CPDF_Dictionary* pDict = pDoc->GetParser()->GetEncryptDict();
return pDict ? pDict->GetIntegerFor("R") : -1;
}