Rizin
unix-like reverse engineering framework and cli tools
|
#include <rz_types.h>
Go to the source code of this file.
Macros | |
#define | SZT_ADD_OVFCHK(x, y) ((SIZE_MAX - (x)) < (y)) |
#define | SSZT_ADD_OVFCHK(a, x) ((((x) > 0) && ((a) > SSIZE_MAX - (x))) || (((x) < 0) && (a) < SSIZE_MIN - (x))) |
#define | UT64_ADD_OVFCHK(x, y) ((UT64_MAX - (x)) < (y)) |
#define | ST64_ADD_OVFCHK(a, x) ((((x) > 0) && ((a) > ST64_MAX - (x))) || (((x) < 0) && (a) < ST64_MIN - (x))) |
#define | UT32_ADD_OVFCHK(x, y) ((UT32_MAX - (x)) < (y)) |
#define | ST32_ADD_OVFCHK(a, x) ((((x) > 0) && ((a) > ST32_MAX - (x))) || (((x) < 0) && (a) < ST32_MIN - (x))) |
#define | UT16_ADD_OVFCHK(x, y) ((UT16_MAX - (x)) < (y)) |
#define | ST16_ADD_OVFCHK(a, b) ((((b) > 0) && ((a) > ST16_MAX - (b))) || (((b) < 0) && ((a) < ST16_MIN - (b)))) |
#define | UT8_ADD_OVFCHK(x, y) ((UT8_MAX - (x)) < (y)) |
#define | ST8_ADD_OVFCHK(a, x) ((((x) > 0) && ((a) > ST8_MAX - (x))) || ((x) < 0 && (a) < ST8_MIN - (x))) |
#define | SZT_SUB_OVFCHK(a, b) SZT_ADD_OVFCHK(a, -(b)) |
#define | SSZT_SUB_OVFCHK(a, b) SSZT_ADD_OVFCHK(a, -(b)) |
#define | UT64_SUB_OVFCHK(a, b) UT64_ADD_OVFCHK(a, -(b)) |
#define | ST64_SUB_OVFCHK(a, b) ST64_ADD_OVFCHK(a, -(b)) |
#define | UT32_SUB_OVFCHK(a, b) UT32_ADD_OVFCHK(a, -(b)) |
#define | ST32_SUB_OVFCHK(a, b) ST32_ADD_OVFCHK(a, -(b)) |
#define | UT16_SUB_OVFCHK(a, b) UT16_ADD_OVFCHK(a, -(b)) |
#define | ST16_SUB_OVFCHK(a, b) ST16_ADD_OVFCHK(a, -(b)) |
#define | UT8_SUB_OVFCHK(a, b) UT8_ADD_OVFCHK(a, -(b)) |
#define | ST8_SUB_OVFCHK(a, b) ST8_ADD_OVFCHK(a, -(b)) |
#define | UNSIGNED_MUL_OVERFLOW_CHECK(overflow_name, type_base, type_min, type_max) |
#define | SIGNED_MUL_OVERFLOW_CHECK(overflow_name, type_base, type_min, type_max) |
#define | SIGNED_DIV_OVERFLOW_CHECK(overflow_name, type_base, type_mid, type_max) |
#define | UNSIGNED_DIV_OVERFLOW_CHECK(overflow_name, type_base, type_min, type_max) |
#define SIGNED_DIV_OVERFLOW_CHECK | ( | overflow_name, | |
type_base, | |||
type_mid, | |||
type_max | |||
) |
Definition at line 56 of file rz_types_overflow.h.
#define SIGNED_MUL_OVERFLOW_CHECK | ( | overflow_name, | |
type_base, | |||
type_min, | |||
type_max | |||
) |
#define SSZT_ADD_OVFCHK | ( | a, | |
x | |||
) | ((((x) > 0) && ((a) > SSIZE_MAX - (x))) || (((x) < 0) && (a) < SSIZE_MIN - (x))) |
Definition at line 12 of file rz_types_overflow.h.
#define SSZT_SUB_OVFCHK | ( | a, | |
b | |||
) | SSZT_ADD_OVFCHK(a, -(b)) |
Definition at line 26 of file rz_types_overflow.h.
#define ST16_ADD_OVFCHK | ( | a, | |
b | |||
) | ((((b) > 0) && ((a) > ST16_MAX - (b))) || (((b) < 0) && ((a) < ST16_MIN - (b)))) |
Definition at line 18 of file rz_types_overflow.h.
#define ST16_SUB_OVFCHK | ( | a, | |
b | |||
) | ST16_ADD_OVFCHK(a, -(b)) |
Definition at line 32 of file rz_types_overflow.h.
#define ST32_ADD_OVFCHK | ( | a, | |
x | |||
) | ((((x) > 0) && ((a) > ST32_MAX - (x))) || (((x) < 0) && (a) < ST32_MIN - (x))) |
Definition at line 16 of file rz_types_overflow.h.
#define ST32_SUB_OVFCHK | ( | a, | |
b | |||
) | ST32_ADD_OVFCHK(a, -(b)) |
Definition at line 30 of file rz_types_overflow.h.
#define ST64_ADD_OVFCHK | ( | a, | |
x | |||
) | ((((x) > 0) && ((a) > ST64_MAX - (x))) || (((x) < 0) && (a) < ST64_MIN - (x))) |
Definition at line 14 of file rz_types_overflow.h.
#define ST64_SUB_OVFCHK | ( | a, | |
b | |||
) | ST64_ADD_OVFCHK(a, -(b)) |
Definition at line 28 of file rz_types_overflow.h.
#define ST8_ADD_OVFCHK | ( | a, | |
x | |||
) | ((((x) > 0) && ((a) > ST8_MAX - (x))) || ((x) < 0 && (a) < ST8_MIN - (x))) |
Definition at line 20 of file rz_types_overflow.h.
#define ST8_SUB_OVFCHK | ( | a, | |
b | |||
) | ST8_ADD_OVFCHK(a, -(b)) |
Definition at line 34 of file rz_types_overflow.h.
Definition at line 11 of file rz_types_overflow.h.
#define SZT_SUB_OVFCHK | ( | a, | |
b | |||
) | SZT_ADD_OVFCHK(a, -(b)) |
Definition at line 25 of file rz_types_overflow.h.
#define UNSIGNED_DIV_OVERFLOW_CHECK | ( | overflow_name, | |
type_base, | |||
type_min, | |||
type_max | |||
) |
#define UNSIGNED_MUL_OVERFLOW_CHECK | ( | overflow_name, | |
type_base, | |||
type_min, | |||
type_max | |||
) |
Definition at line 17 of file rz_types_overflow.h.
#define UT16_SUB_OVFCHK | ( | a, | |
b | |||
) | UT16_ADD_OVFCHK(a, -(b)) |
Definition at line 31 of file rz_types_overflow.h.
Definition at line 15 of file rz_types_overflow.h.
#define UT32_SUB_OVFCHK | ( | a, | |
b | |||
) | UT32_ADD_OVFCHK(a, -(b)) |
Definition at line 29 of file rz_types_overflow.h.
Definition at line 13 of file rz_types_overflow.h.
#define UT64_SUB_OVFCHK | ( | a, | |
b | |||
) | UT64_ADD_OVFCHK(a, -(b)) |
Definition at line 27 of file rz_types_overflow.h.
Definition at line 19 of file rz_types_overflow.h.
#define UT8_SUB_OVFCHK | ( | a, | |
b | |||
) | UT8_ADD_OVFCHK(a, -(b)) |
Definition at line 33 of file rz_types_overflow.h.