https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5f3d3d7d48774fc9b997d…
commit 5f3d3d7d48774fc9b997d57e2f4694ff6655d3ad
Author: Jérôme Gardou <jerome.gardou(a)reactos.org>
AuthorDate: Tue Dec 29 16:40:03 2020 +0100
Commit: Jérôme Gardou <jerome.gardou(a)reactos.org>
CommitDate: Tue Jan 5 13:40:35 2021 +0100
[PSDK] Add more safe integer routines for LONGLONGs
---
sdk/include/psdk/intsafe.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/sdk/include/psdk/intsafe.h b/sdk/include/psdk/intsafe.h
index 10fb173beb5..2dc0954b152 100644
--- a/sdk/include/psdk/intsafe.h
+++ b/sdk/include/psdk/intsafe.h
@@ -382,6 +382,8 @@ DEFINE_SAFE_CONVERT_STOU(LongPtrToULong, LONG_PTR, ULONG)
DEFINE_SAFE_CONVERT_STOU(LongPtrToUIntPtr, LONG_PTR, UINT_PTR)
DEFINE_SAFE_CONVERT_STOU(LongPtrToULongPtr, LONG_PTR, ULONG_PTR)
DEFINE_SAFE_CONVERT_STOU(LongPtrToULongLong, LONG_PTR, ULONGLONG)
+DEFINE_SAFE_CONVERT_STOU(LongLongToULong, LONGLONG, ULONG)
+DEFINE_SAFE_CONVERT_STOU(LongLongToULongPtr, LONGLONG, ULONG_PTR)
#ifdef _CHAR_UNSIGNED
DEFINE_SAFE_CONVERT_STOU(ShortToChar, SHORT, UINT8)
DEFINE_SAFE_CONVERT_STOU(LongPtrToChar, LONG_PTR, UINT8)
@@ -460,6 +462,9 @@ DEFINE_SAFE_CONVERT_STOS(LongPtrToChar, LONG_PTR, _INTSAFE_CHAR)
#define RtlSIZETToULong RtlULongPtrToULong
#define RtlSSIZETToULongLong RtlLongPtrToULongLong
#define RtlSSIZETToULong RtlLongPtrToULong
+#define RtlLongLongToSizeT RtlLongLongToUIntPtr
+#define RtlLongLongToSSIZET RtlLongLongToLongPtr
+#define RtlLongLongToSIZET RtlLongLongToULongPtr
#ifdef _WIN64
#define RtlIntToUIntPtr RtlIntToULongLong
#define RtlULongLongToIntPtr RtlULongLongToLongLong
@@ -497,6 +502,9 @@ DEFINE_SAFE_CONVERT_STOS(LongPtrToChar, LONG_PTR, _INTSAFE_CHAR)
#define SIZETToULong ULongPtrToULong
#define SSIZETToULongLong LongPtrToULongLong
#define SSIZETToULong LongPtrToULong
+#define LongLongToSizeT LongLongToUIntPtr
+#define LongLongToSSIZET LongLongToLongPtr
+#define LongLongToSIZET LongLongToULongPtr
#ifdef _WIN64
#define IntToUIntPtr IntToULongLong
#define ULongLongToIntPtr ULongLongToLongLong