Skip to content

Commit

Permalink
Increase robustness of non-initialized bignums.
Browse files Browse the repository at this point in the history
  • Loading branch information
dfaranha committed Jul 9, 2021
1 parent d834ca4 commit e6209fd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/bn/relic_bn_mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ void bn_make(bn_t a, int digits) {
}
#endif
if (a != NULL) {
a->used = 0;
a->used = 1;
a->dp[0] = 0;
a->alloc = digits;
a->sign = RLC_POS;
}
Expand Down

0 comments on commit e6209fd

Please sign in to comment.