diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-02-04 10:37:17 -0800 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-02-04 10:37:17 -0800 |
commit | 62120b79bbaca7430a8fc7ba0846b0a84f40542d (patch) | |
tree | 895210d653f0b016c536d8f0e2626b9f560a3304 /core/src/fpdfapi | |
parent | c32dac1f9dcd75aeabd9ea1af257499270d2f041 (diff) | |
download | pdfium-62120b79bbaca7430a8fc7ba0846b0a84f40542d.tar.xz |
Prevent base::CheckedNumeric from leaking outside of pdfium.
Headers in /include directories should be free of implementation details
from third_party. Put the types into a new header outside of /include.
Requires https://codereview.chromium.org/902443003/ before a version containing this patch is rolled into chromium.
R=jam@chromium.org
Review URL: https://codereview.chromium.org/896023003
Diffstat (limited to 'core/src/fpdfapi')
-rw-r--r-- | core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp | 5 | ||||
-rw-r--r-- | core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp | 2 | ||||
-rw-r--r-- | core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp | 2 |
3 files changed, 6 insertions, 3 deletions
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp index 3ceb0f7e8b..7d727f37fb 100644 --- a/core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp +++ b/core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp @@ -4,11 +4,14 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com +#include <limits.h> + #include "../../../include/fpdfapi/fpdf_page.h" #include "../../../include/fpdfapi/fpdf_module.h" +#include "../../../src/fxcrt/fx_safe_types.h" #include "../../../third_party/numerics/safe_conversions_impl.h" #include "pageint.h" -#include <limits.h> + class CPDF_PSEngine; typedef enum {PSOP_ADD, PSOP_SUB, PSOP_MUL, PSOP_DIV, PSOP_IDIV, PSOP_MOD, PSOP_NEG, PSOP_ABS, PSOP_CEILING, PSOP_FLOOR, PSOP_ROUND, PSOP_TRUNCATE, diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp index 3d999ecf19..340da6f66b 100644 --- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp +++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp @@ -7,7 +7,7 @@ #include "../../../include/fpdfapi/fpdf_parser.h" #include "../../../include/fpdfapi/fpdf_module.h" #include "../../../include/fpdfapi/fpdf_page.h" -#include "../../../../third_party/numerics/safe_math.h" +#include "../../../src/fxcrt/fx_safe_types.h" #include "../fpdf_page/pageint.h" #include <utility> #include <vector> diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp index 1637655e68..f938628f55 100644 --- a/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp +++ b/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp @@ -9,9 +9,9 @@ #include "../../../include/fpdfapi/fpdf_module.h" #include "../../../include/fpdfapi/fpdf_render.h" #include "../../../include/fpdfapi/fpdf_pageobj.h" +#include "../../../src/fxcrt/fx_safe_types.h" #include "../fpdf_page/pageint.h" #include "render_int.h" -#include "../../../../third_party/numerics/safe_math.h" static unsigned int _GetBits8(FX_LPCBYTE pData, int bitpos, int nbits) { |