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

Side by Side Diff: core/fpdfapi/fpdf_page/cpdf_clippathdata.h

Issue 1998583002: Fix leak in CPDF_StreamContentParser::AddTextObject(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: More vectors, fix leak Created 4 years, 7 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
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 #ifndef CORE_FPDFAPI_FPDF_PAGE_CPDF_CLIPPATHDATA_H_ 7 #ifndef CORE_FPDFAPI_FPDF_PAGE_CPDF_CLIPPATHDATA_H_
8 #define CORE_FPDFAPI_FPDF_PAGE_CPDF_CLIPPATHDATA_H_ 8 #define CORE_FPDFAPI_FPDF_PAGE_CPDF_CLIPPATHDATA_H_
9 9
10 #include <stdint.h> 10 #include <stdint.h>
11 11
12 #include <memory>
13 #include <vector>
14
12 class CPDF_Path; 15 class CPDF_Path;
13 class CPDF_TextObject; 16 class CPDF_TextObject;
14 17
15 class CPDF_ClipPathData { 18 class CPDF_ClipPathData {
16 public: 19 public:
17 CPDF_ClipPathData(); 20 CPDF_ClipPathData();
18 CPDF_ClipPathData(const CPDF_ClipPathData&); 21 CPDF_ClipPathData(const CPDF_ClipPathData&);
19 ~CPDF_ClipPathData(); 22 ~CPDF_ClipPathData();
20 23
21 void SetCount(int path_count, int text_count); 24 std::vector<CPDF_Path> m_PathList;
22 25 std::vector<uint8_t> m_TypeList;
23 int m_PathCount; 26 std::vector<std::unique_ptr<CPDF_TextObject>> m_TextList;
24 CPDF_Path* m_pPathList;
25 uint8_t* m_pTypeList;
26 int m_TextCount;
27 CPDF_TextObject** m_pTextList;
28 }; 27 };
29 28
30 #endif // CORE_FPDFAPI_FPDF_PAGE_CPDF_CLIPPATHDATA_H_ 29 #endif // CORE_FPDFAPI_FPDF_PAGE_CPDF_CLIPPATHDATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698