diff options
Diffstat (limited to 'libtommath/bn_mp_init_size.c')
-rw-r--r-- | libtommath/bn_mp_init_size.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libtommath/bn_mp_init_size.c b/libtommath/bn_mp_init_size.c index 9b933fb..1becb23 100644 --- a/libtommath/bn_mp_init_size.c +++ b/libtommath/bn_mp_init_size.c @@ -21,7 +21,7 @@ int mp_init_size(mp_int *a, int size) size += (MP_PREC * 2) - (size % MP_PREC); /* alloc mem */ - a->dp = OPT_CAST(mp_digit) XMALLOC(sizeof(mp_digit) * (size_t)size); + a->dp = (mp_digit *) XMALLOC((size_t)size * sizeof(mp_digit)); if (a->dp == NULL) { return MP_MEM; } |