Commit 0b73dab69f5774231d365c3d1232f993f4e7dcd2

Daniel Mendler 2019-05-13T15:04:30

MP_FREE_DIGITS: add missing cast

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/tommath_private.h b/tommath_private.h
index 9e052ce..5575a88 100644
--- a/tommath_private.h
+++ b/tommath_private.h
@@ -31,7 +31,7 @@ extern "C" {
  */
 #ifdef MP_NO_ZERO_ON_FREE
 #  define MP_FREE_BUFFER(mem, size)   MP_FREE((mem), (size))
-#  define MP_FREE_DIGITS(mem, digits) MP_FREE((mem), sizeof (mp_digit) * (digits))
+#  define MP_FREE_DIGITS(mem, digits) MP_FREE((mem), sizeof (mp_digit) * (size_t)(digits))
 #else
 #  define MP_FREE_BUFFER(mem, size)                     \
 do {                                                    \