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

Side by Side Diff: core/fpdfapi/fpdf_parser/cpdf_syntax_parser.cpp

Issue 1802553004: Fix offset outside bounds warning on GCC (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Another typo in comment. Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | core/include/fxcrt/fx_string.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "core/fpdfapi/fpdf_parser/cpdf_syntax_parser.h" 7 #include "core/fpdfapi/fpdf_parser/cpdf_syntax_parser.h"
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 if (key.IsEmpty()) 464 if (key.IsEmpty())
465 continue; 465 continue;
466 466
467 if (key == "/Contents") 467 if (key == "/Contents")
468 dwSignValuePos = m_Pos; 468 dwSignValuePos = m_Pos;
469 469
470 CPDF_Object* pObj = GetObject(pObjList, objnum, gennum, true); 470 CPDF_Object* pObj = GetObject(pObjList, objnum, gennum, true);
471 if (!pObj) 471 if (!pObj)
472 continue; 472 continue;
473 473
474 CFX_ByteStringC keyNoSlash(key.c_str() + 1, key.GetLength() - 1); 474 CFX_ByteStringC keyNoSlash(key.raw_str() + 1, key.GetLength() - 1);
475 pDict->SetAt(keyNoSlash, pObj); 475 pDict->SetAt(keyNoSlash, pObj);
476 } 476 }
477 477
478 // Only when this is a signature dictionary and has contents, we reset the 478 // Only when this is a signature dictionary and has contents, we reset the
479 // contents to the un-decrypted form. 479 // contents to the un-decrypted form.
480 if (pDict->IsSignatureDict() && dwSignValuePos) { 480 if (pDict->IsSignatureDict() && dwSignValuePos) {
481 CFX_AutoRestorer<FX_FILESIZE> save_pos(&m_Pos); 481 CFX_AutoRestorer<FX_FILESIZE> save_pos(&m_Pos);
482 m_Pos = dwSignValuePos; 482 m_Pos = dwSignValuePos;
483 pDict->SetAt("Contents", GetObject(pObjList, objnum, gennum, false)); 483 pDict->SetAt("Contents", GetObject(pObjList, objnum, gennum, false));
484 } 484 }
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
981 if (limit && m_Pos == limit) 981 if (limit && m_Pos == limit)
982 return -1; 982 return -1;
983 } 983 }
984 return -1; 984 return -1;
985 } 985 }
986 986
987 void CPDF_SyntaxParser::SetEncrypt( 987 void CPDF_SyntaxParser::SetEncrypt(
988 std::unique_ptr<IPDF_CryptoHandler> pCryptoHandler) { 988 std::unique_ptr<IPDF_CryptoHandler> pCryptoHandler) {
989 m_pCryptoHandler = std::move(pCryptoHandler); 989 m_pCryptoHandler = std::move(pCryptoHandler);
990 } 990 }
OLDNEW
« no previous file with comments | « no previous file | core/include/fxcrt/fx_string.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698