| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
#include <aws/common/byte_buf.h> |
| 7 |
#include <aws/common/private/byte_buf.h> |
| 8 |
#include <proof_helpers/make_common_data_structures.h> |
| 9 |
|
| 10 |
void aws_nospec_mask_harness() { |
| 11 |
|
| 12 |
size_t index; |
| 13 |
size_t bound; |
| 14 |
|
| 15 |
|
| 16 |
size_t rval = aws_nospec_mask(index, bound); |
| 17 |
|
| 18 |
|
| 19 |
if (rval == 0) { |
| 20 |
assert((index >= bound) || (bound > (SIZE_MAX / 2)) || (index > (SIZE_MAX / 2))); |
| 21 |
} else { |
| 22 |
assert(rval == UINTPTR_MAX); |
| 23 |
assert(!((index >= bound) || (bound > (SIZE_MAX / 2)) || (index > (SIZE_MAX / 2)))); |
| 24 |
} |
| 25 |
} |