1 // Copyright 2014 The PDFium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef CORE_FXCRT_FX_SAFE_TYPES_H_ 6 #define CORE_FXCRT_FX_SAFE_TYPES_H_ 7 8 #include <stddef.h> 9 #include <stdint.h> 10 11 #include "core/fxcrt/fx_types.h" 12 #include "third_party/base/numerics/safe_math.h" 13 14 using FX_SAFE_UINT32 = pdfium::base::CheckedNumeric<uint32_t>; 15 using FX_SAFE_INT32 = pdfium::base::CheckedNumeric<int32_t>; 16 using FX_SAFE_SIZE_T = pdfium::base::CheckedNumeric<size_t>; 17 using FX_SAFE_FILESIZE = pdfium::base::CheckedNumeric<FX_FILESIZE>; 18 19 #endif // CORE_FXCRT_FX_SAFE_TYPES_H_ 20