We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c6d47ac commit abbc07fCopy full SHA for abbc07f
src/integer.h
@@ -65,6 +65,16 @@ GIT_INLINE(int) git__is_int(long long p)
65
# error compiler has add with overflow intrinsics but SIZE_MAX is unknown
66
# endif
67
68
+/* Use Microsoft's safe integer handling functions where available */
69
+#elif defined(_MSC_VER)
70
+
71
+# include <intsafe.h>
72
73
+# define git__add_sizet_overflow(out, one, two) \
74
+ (SizeTAdd(one, two, out) != S_OK)
75
+# define git__multiply_sizet_overflow(out, one, two) \
76
+ (SizeTMult(one, two, out) != S_OK)
77
78
#else
79
80
/**
0 commit comments