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

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

Issue 803103002: Fix a bug that occurs when an object has the same object number with the root object (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
index 2f834ea400b8f3be2e1f3a313dabf30676746180..52dda954d2a68d73b4dafddab670d9b664b5d5f7 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
@@ -1002,7 +1002,7 @@ FX_BOOL CPDF_Parser::LoadCrossRefV5(FX_FILESIZE pos, FX_FILESIZE& prev, FX_BOOL
if (!pStream) {
return FALSE;
}
- if (m_pDocument) {
+ if (m_pDocument && m_pDocument->GetRoot()->GetObjNum() != pStream->m_ObjNum) {
Bo Xu 2014/12/15 17:49:25 Could GetRoot() return null?
jun_fang 2014/12/15 18:46:48 m_pRootDict is returned from GetRoot().It's assign
Tom Sepez 2014/12/15 19:33:43 How about returning false if this is the case? Is
m_pDocument->InsertIndirectObject(pStream->m_ObjNum, pStream);
}
if (pStream->GetType() != PDFOBJ_STREAM) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698