summaryrefslogtreecommitdiff
path: root/core/src/fpdfapi/fpdf_parser
diff options
context:
space:
mode:
authorBo Xu <bo_xu@foxitsoftware.com>2014-09-15 11:28:25 -0700
committerBo Xu <bo_xu@foxitsoftware.com>2014-09-15 11:28:25 -0700
commit4cce875b219ea772da8d528287b0e6431dcda48e (patch)
treefd53c66e459cc6418e935dcc30948423bc9659a4 /core/src/fpdfapi/fpdf_parser
parent56ef173042d786281edcbbc9f1c38c8f97ef10d5 (diff)
downloadpdfium-4cce875b219ea772da8d528287b0e6431dcda48e.tar.xz
Check Null pointer in CPDF_Dictionary::GetUnicodeText
BUG=414155 R=thakis@chromium.org Review URL: https://codereview.chromium.org/574463002
Diffstat (limited to 'core/src/fpdfapi/fpdf_parser')
-rw-r--r--core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp
index e945ab52a0..07b447b1b6 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp
@@ -626,7 +626,9 @@ CFX_WideString CPDF_Dictionary::GetUnicodeText(FX_BSTR key, CFX_CharMap* pCharMa
if (p) {
if(p->GetType() == PDFOBJ_REFERENCE) {
p = ((CPDF_Reference*)p)->GetDirect();
- return p->GetUnicodeText(pCharMap);
+ if (p) {
+ return p->GetUnicodeText(pCharMap);
+ }
} else {
return p->GetUnicodeText(pCharMap);
}