Skip to content

Commit 6fc673d

Browse files
committed
statically check MP_PREC >= MP_MIN_PREC
1 parent 7365442 commit 6fc673d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

bn_mp_shrink.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@
66
/* shrink a bignum */
77
int mp_shrink(mp_int *a)
88
{
9+
static int static_check[-(MP_PREC < MP_MIN_PREC)];
910
mp_digit *tmp;
1011
int alloc = MP_MAX(MP_MIN_PREC, a->used);
12+
(void)static_check;
1113
if (a->alloc != alloc) {
1214
if ((tmp = (mp_digit *) MP_REALLOC(a->dp,
1315
(size_t)a->alloc * sizeof(mp_digit),

0 commit comments

Comments
 (0)