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

Unified Diff: core/fpdfapi/fpdf_parser/include/cpdf_stream.h

Issue 2250533002: Fix stack overflow in object Clone() functions (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: rebase again Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fpdfapi/fpdf_parser/include/cpdf_reference.h ('k') | core/fpdfapi/fpdf_parser/include/cpdf_string.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/fpdf_parser/include/cpdf_stream.h
diff --git a/core/fpdfapi/fpdf_parser/include/cpdf_stream.h b/core/fpdfapi/fpdf_parser/include/cpdf_stream.h
index 6aa8bca8dc4e98829281bf24f79f5bb07e222ed2..7ea761ef51d257796003447f380e10e7f585899f 100644
--- a/core/fpdfapi/fpdf_parser/include/cpdf_stream.h
+++ b/core/fpdfapi/fpdf_parser/include/cpdf_stream.h
@@ -7,6 +7,8 @@
#ifndef CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_STREAM_H_
#define CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_STREAM_H_
+#include <set>
+
#include "core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h"
#include "core/fpdfapi/fpdf_parser/include/cpdf_object.h"
#include "core/fxcrt/include/fx_stream.h"
@@ -17,7 +19,7 @@ class CPDF_Stream : public CPDF_Object {
// CPDF_Object.
Type GetType() const override;
- CPDF_Object* Clone(FX_BOOL bDirect = FALSE) const override;
+ CPDF_Object* Clone() const override;
CPDF_Dictionary* GetDict() const override;
CFX_WideString GetUnicodeText() const override;
bool IsStream() const override;
@@ -45,6 +47,9 @@ class CPDF_Stream : public CPDF_Object {
static const uint32_t kMemoryBasedGenNum = (uint32_t)-1;
~CPDF_Stream() override;
+ CPDF_Object* CloneNonCyclic(
+ bool bDirect,
+ std::set<const CPDF_Object*>* pVisited) const override;
void InitStreamInternal(CPDF_Dictionary* pDict);
« no previous file with comments | « core/fpdfapi/fpdf_parser/include/cpdf_reference.h ('k') | core/fpdfapi/fpdf_parser/include/cpdf_string.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698