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

Side by Side Diff: core/fxge/dib/dib_int.h

Issue 2404453003: Strengthen bounds check in CWeightTable::Calc * part II (Closed)
Patch Set: Created 4 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 | « no previous file | core/fxge/dib/fx_dib_engine.cpp » ('j') | core/fxge/dib/fx_dib_engine.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 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_FXGE_DIB_DIB_INT_H_ 7 #ifndef CORE_FXGE_DIB_DIB_INT_H_
8 #define CORE_FXGE_DIB_DIB_INT_H_ 8 #define CORE_FXGE_DIB_DIB_INT_H_
9 9
10 #include <stdint.h> 10 #include <stdint.h>
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 bool Calc(int dest_len, 49 bool Calc(int dest_len,
50 int dest_min, 50 int dest_min,
51 int dest_max, 51 int dest_max,
52 int src_len, 52 int src_len,
53 int src_min, 53 int src_min,
54 int src_max, 54 int src_max,
55 int flags); 55 int flags);
56 PixelWeight* GetPixelWeight(int pixel) const; 56 PixelWeight* GetPixelWeight(int pixel) const;
57 int* GetValueFromPixelWeight(PixelWeight* pWeight, int index) const; 57 int* GetValueFromPixelWeight(PixelWeight* pWeight, int index) const;
58 size_t GetPixelWeightSize() const; 58 size_t GetMaximumPixelWeightSize(PixelWeight* pWeight) const;
59 59
60 private: 60 private:
61 int m_DestMin; 61 int m_DestMin;
62 int m_ItemSize; 62 int m_ItemSize;
63 uint8_t* m_pWeightTables; 63 uint8_t* m_pWeightTables;
64 size_t m_dwWeightTablesSize; 64 size_t m_dwWeightTablesSize;
65 }; 65 };
66 66
67 class CStretchEngine { 67 class CStretchEngine {
68 public: 68 public:
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 int m_State; 107 int m_State;
108 }; 108 };
109 109
110 FX_RECT FXDIB_SwapClipBox(FX_RECT& clip, 110 FX_RECT FXDIB_SwapClipBox(FX_RECT& clip,
111 int width, 111 int width,
112 int height, 112 int height,
113 FX_BOOL bFlipX, 113 FX_BOOL bFlipX,
114 FX_BOOL bFlipY); 114 FX_BOOL bFlipY);
115 115
116 #endif // CORE_FXGE_DIB_DIB_INT_H_ 116 #endif // CORE_FXGE_DIB_DIB_INT_H_
OLDNEW
« no previous file with comments | « no previous file | core/fxge/dib/fx_dib_engine.cpp » ('j') | core/fxge/dib/fx_dib_engine.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698