diff options
author | 2012-01-04 19:03:08 +0000 | |
---|---|---|
committer | 2012-01-04 19:03:08 +0000 | |
commit | 332548e94c0eb6ab4edfe6aced8ee947a185164f (patch) | |
tree | 06ed0421128b6e0aa9a887462ed7210fe7b1f9f9 /sys | |
parent | Fix use after free in cache_lookup() - found by Pedro (diff) | |
download | wireguard-openbsd-332548e94c0eb6ab4edfe6aced8ee947a185164f.tar.xz wireguard-openbsd-332548e94c0eb6ab4edfe6aced8ee947a185164f.zip |
Make sure the types of INTPTR_MIN/MAX and UINTPTR_MIN/MAX match the type we
use for intptr_t and uintptr_t.
ok millert@, deraadt@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/sys/stdint.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/sys/stdint.h b/sys/sys/stdint.h index 0a81ba3c6ca..2e824add9ec 100644 --- a/sys/sys/stdint.h +++ b/sys/sys/stdint.h @@ -1,4 +1,4 @@ -/* $OpenBSD: stdint.h,v 1.5 2011/09/08 02:47:12 guenther Exp $ */ +/* $OpenBSD: stdint.h,v 1.6 2012/01/04 19:03:08 kettenis Exp $ */ /* * Copyright (c) 1997, 2005 Todd C. Miller <Todd.Miller@courtesan.com> @@ -153,13 +153,13 @@ typedef __uintmax_t uintmax_t; /* 7.18.2.4 Limits of integer types capable of holding object pointers */ #ifdef __LP64__ -#define INTPTR_MIN INT64_MIN -#define INTPTR_MAX INT64_MAX -#define UINTPTR_MAX UINT64_MAX +#define INTPTR_MIN (-0x7fffffffffffffffL - 1) +#define INTPTR_MAX 0x7fffffffffffffffL +#define UINTPTR_MAX 0xffffffffffffffffUL #else -#define INTPTR_MIN INT32_MIN -#define INTPTR_MAX INT32_MAX -#define UINTPTR_MAX UINT32_MAX +#define INTPTR_MIN (-0x7fffffffL - 1) +#define INTPTR_MAX 0x7fffffffL +#define UINTPTR_MAX 0xffffffffUL #endif /* 7.18.2.5 Limits of greatest-width integer types */ |