summaryrefslogtreecommitdiffstats
path: root/libtommath/bn_mp_grow.c
diff options
context:
space:
mode:
Diffstat (limited to 'libtommath/bn_mp_grow.c')
-rw-r--r--libtommath/bn_mp_grow.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libtommath/bn_mp_grow.c b/libtommath/bn_mp_grow.c
index 0030931..60f8f32 100644
--- a/libtommath/bn_mp_grow.c
+++ b/libtommath/bn_mp_grow.c
@@ -32,7 +32,7 @@ int mp_grow(mp_int *a, int size)
* in case the operation failed we don't want
* to overwrite the dp member of a.
*/
- tmp = OPT_CAST(mp_digit) XREALLOC(a->dp, sizeof(mp_digit) * size);
+ tmp = OPT_CAST(mp_digit) XREALLOC(a->dp, sizeof(mp_digit) * (size_t)size);
if (tmp == NULL) {
/* reallocation failed but "a" is still valid [can be freed] */
return MP_MEM;