]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Base SIZE_T_CEILING on SSIZE_T_MAX.
authorNick Mathewson <nickm@torproject.org>
Mon, 13 Dec 2010 23:40:15 +0000 (18:40 -0500)
committerNick Mathewson <nickm@torproject.org>
Mon, 13 Dec 2010 23:40:15 +0000 (18:40 -0500)
src/common/torint.h

index d9722868d27230ebadf38f6c33907c4937ca5ce1..665b0b4c71dbd476be87bc2338af3e6c50f235b3 100644 (file)
@@ -331,7 +331,7 @@ typedef uint32_t uintptr_t;
 #endif
 
 /* Any size_t larger than this amount is likely to be an underflow. */
-#define SIZE_T_CEILING (sizeof(char)<<(sizeof(size_t)*8 - 1))
+#define SIZE_T_CEILING (SSIZE_T_MAX-16)
 
 #endif /* __TORINT_H */