Skip to content

Commit e6209fd

Browse files
committed
Increase robustness of non-initialized bignums.
1 parent d834ca4 commit e6209fd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/bn/relic_bn_mem.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ void bn_make(bn_t a, int digits) {
8585
}
8686
#endif
8787
if (a != NULL) {
88-
a->used = 0;
88+
a->used = 1;
89+
a->dp[0] = 0;
8990
a->alloc = digits;
9091
a->sign = RLC_POS;
9192
}

0 commit comments

Comments
 (0)