diff options
author | Tom Sepez <tsepez@chromium.org> | 2016-02-19 14:22:56 -0800 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2016-02-19 14:22:56 -0800 |
commit | 78353d5dbc0b0c9b2d6946005439a51efa7d108c (patch) | |
tree | 2d0048714b8630cd22b2f8e3129318ed93ee945d /core/include/fxcrt/fx_safe_types.h | |
parent | 711046ac7043ebeec2b0c9a5eb168418cd07a876 (diff) | |
download | pdfium-78353d5dbc0b0c9b2d6946005439a51efa7d108c.tar.xz |
Use safe arithmentic in CFX_BinaryBuf::ExpandBuf.
Always call ExpandBuf(), and if it returns, we know the
subsequent calculations won't overflow.
Also use std::unique_ptr, and fix unintentional copies thus
detected by its suppressed copy ctor in fsdk_baseform.cpp
Also Remove unused CFX_BinaryBuf::TakeOver(), AppendFill(), CopyData().
Also remove operator= in favor of using <<, for similarity
with std::ostream and friends.
Also move ByteStringC methods to CFX_ByteTextBuf sub-class.
Also re-order members, may pack tighter on 64-bits.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1710403002 .
Diffstat (limited to 'core/include/fxcrt/fx_safe_types.h')
-rw-r--r-- | core/include/fxcrt/fx_safe_types.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/include/fxcrt/fx_safe_types.h b/core/include/fxcrt/fx_safe_types.h index aec1ca7e96..6ae3ee1054 100644 --- a/core/include/fxcrt/fx_safe_types.h +++ b/core/include/fxcrt/fx_safe_types.h @@ -15,5 +15,6 @@ typedef pdfium::base::CheckedNumeric<FX_DWORD> FX_SAFE_DWORD; typedef pdfium::base::CheckedNumeric<int32_t> FX_SAFE_INT32; typedef pdfium::base::CheckedNumeric<size_t> FX_SAFE_SIZE_T; typedef pdfium::base::CheckedNumeric<FX_FILESIZE> FX_SAFE_FILESIZE; +typedef pdfium::base::CheckedNumeric<FX_STRSIZE> FX_SAFE_STRSIZE; #endif // CORE_INCLUDE_FXCRT_FX_SAFE_TYPES_H_ |