diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-10-17 11:09:10 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-10-17 11:09:10 (GMT) |
commit | 6893ec40c9e47ef1cf2eb15fc4e656e44ff94fba (patch) | |
tree | 4947a9fe266f7401ce5b4b638f28647a14e1f6d3 /libtommath/bn_mp_init.c | |
parent | e5c5cd920bb372946311de4f524c340154324119 (diff) | |
parent | 6dd152f0407fefebbdd94e2aa2e3c9fd7e23ad6e (diff) | |
download | tcl-6893ec40c9e47ef1cf2eb15fc4e656e44ff94fba.zip tcl-6893ec40c9e47ef1cf2eb15fc4e656e44ff94fba.tar.gz tcl-6893ec40c9e47ef1cf2eb15fc4e656e44ff94fba.tar.bz2 |
Merge libtommath
Diffstat (limited to 'libtommath/bn_mp_init.c')
-rw-r--r-- | libtommath/bn_mp_init.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libtommath/bn_mp_init.c b/libtommath/bn_mp_init.c index 2eb7924..a4c9175 100644 --- a/libtommath/bn_mp_init.c +++ b/libtommath/bn_mp_init.c @@ -7,7 +7,8 @@ mp_err mp_init(mp_int *a) { /* allocate memory required and clear it */ - a->dp = (mp_digit *) MP_CALLOC((size_t)MP_PREC, sizeof(mp_digit)); + a->dp = (mp_digit *) MP_MALLOC((size_t)MP_PREC * sizeof(mp_digit)); + MP_ZERO_DIGITS(a->dp, MP_PREC); if (a->dp == NULL) { return MP_MEM; } |