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

Side by Side Diff: core/src/fxcodec/jbig2/JBig2_SddProc.h

Issue 1388203003: Sanitize CJBig2_SymbolDict's memory usage. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: rebase Created 5 years, 2 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 | « core/src/fxcodec/jbig2/JBig2_Context.cpp ('k') | core/src/fxcodec/jbig2/JBig2_SddProc.cpp » ('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 2015 PDFium Authors. All rights reserved. 1 // Copyright 2015 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_SRC_FXCODEC_JBIG2_JBIG2_SDDPROC_H_ 7 #ifndef CORE_SRC_FXCODEC_JBIG2_JBIG2_SDDPROC_H_
8 #define CORE_SRC_FXCODEC_JBIG2_JBIG2_SDDPROC_H_ 8 #define CORE_SRC_FXCODEC_JBIG2_JBIG2_SDDPROC_H_
9 9
10 #include <vector>
11
10 #include "../../../include/fxcrt/fx_system.h" 12 #include "../../../include/fxcrt/fx_system.h"
13 #include "JBig2_ArithDecoder.h"
11 14
12 class CJBig2_ArithDecoder;
13 class CJBig2_BitStream; 15 class CJBig2_BitStream;
14 class CJBig2_HuffmanTable; 16 class CJBig2_HuffmanTable;
15 class CJBig2_Image; 17 class CJBig2_Image;
16 class CJBig2_SymbolDict; 18 class CJBig2_SymbolDict;
17 class IFX_Pause; 19 class IFX_Pause;
18 struct JBig2ArithCtx;
19 20
20 class CJBig2_SDDProc { 21 class CJBig2_SDDProc {
21 public: 22 public:
22 CJBig2_SymbolDict* decode_Arith(CJBig2_ArithDecoder* pArithDecoder, 23 CJBig2_SymbolDict* decode_Arith(CJBig2_ArithDecoder* pArithDecoder,
23 JBig2ArithCtx* gbContext, 24 std::vector<JBig2ArithCtx>* gbContext,
24 JBig2ArithCtx* grContext); 25 std::vector<JBig2ArithCtx>* grContext);
25 26
26 CJBig2_SymbolDict* decode_Huffman(CJBig2_BitStream* pStream, 27 CJBig2_SymbolDict* decode_Huffman(CJBig2_BitStream* pStream,
27 JBig2ArithCtx* gbContext, 28 std::vector<JBig2ArithCtx>* gbContext,
28 JBig2ArithCtx* grContext, 29 std::vector<JBig2ArithCtx>* grContext,
29 IFX_Pause* pPause); 30 IFX_Pause* pPause);
30 31
31 public: 32 public:
32 FX_BOOL SDHUFF; 33 FX_BOOL SDHUFF;
33 FX_BOOL SDREFAGG; 34 FX_BOOL SDREFAGG;
34 FX_DWORD SDNUMINSYMS; 35 FX_DWORD SDNUMINSYMS;
35 CJBig2_Image** SDINSYMS; 36 CJBig2_Image** SDINSYMS;
36 FX_DWORD SDNUMNEWSYMS; 37 FX_DWORD SDNUMNEWSYMS;
37 FX_DWORD SDNUMEXSYMS; 38 FX_DWORD SDNUMEXSYMS;
38 CJBig2_HuffmanTable* SDHUFFDH; 39 CJBig2_HuffmanTable* SDHUFFDH;
39 CJBig2_HuffmanTable* SDHUFFDW; 40 CJBig2_HuffmanTable* SDHUFFDW;
40 CJBig2_HuffmanTable* SDHUFFBMSIZE; 41 CJBig2_HuffmanTable* SDHUFFBMSIZE;
41 CJBig2_HuffmanTable* SDHUFFAGGINST; 42 CJBig2_HuffmanTable* SDHUFFAGGINST;
42 uint8_t SDTEMPLATE; 43 uint8_t SDTEMPLATE;
43 int8_t SDAT[8]; 44 int8_t SDAT[8];
44 FX_BOOL SDRTEMPLATE; 45 FX_BOOL SDRTEMPLATE;
45 int8_t SDRAT[4]; 46 int8_t SDRAT[4];
46 }; 47 };
47 48
48 #endif // CORE_SRC_FXCODEC_JBIG2_JBIG2_SDDPROC_H_ 49 #endif // CORE_SRC_FXCODEC_JBIG2_JBIG2_SDDPROC_H_
OLDNEW
« no previous file with comments | « core/src/fxcodec/jbig2/JBig2_Context.cpp ('k') | core/src/fxcodec/jbig2/JBig2_SddProc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698