File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 77#ifndef SECP256K1_ASSUMPTIONS_H
88#define SECP256K1_ASSUMPTIONS_H
99
10+ #include <limits.h>
11+
1012#include "util.h"
1113
1214/* This library, like most software, relies on a number of compiler implementation defined (but not undefined)
@@ -19,7 +21,11 @@ struct secp256k1_assumption_checker {
1921 allowed. */
2022 int dummy_array [(
2123 /* Bytes are 8 bits. */
22- CHAR_BIT == 8 &&
24+ (CHAR_BIT == 8 ) &&
25+
26+ /* No integer promotion for uint32_t. This ensures that we can multiply uintXX_t values where XX >= 32
27+ without signed overflow, which would be undefined behaviour. */
28+ (UINT_MAX <= UINT32_MAX ) &&
2329
2430 /* Conversions from unsigned to signed outside of the bounds of the signed type are
2531 implementation-defined. Verify that they function as reinterpreting the lower
You can’t perform that action at this time.
0 commit comments