Commit 708a8bfd556e4c4a7c962f8ba2ca91d4b422f161

Steffen Jaeckel 2019-03-29T10:40:58

Merge pull request #178 from libtom/add-missing-const add missing const to cast

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/bn_mp_import.c b/bn_mp_import.c
index 066c5b3..72a4d19 100644
--- a/bn_mp_import.c
+++ b/bn_mp_import.c
@@ -43,7 +43,7 @@ int mp_import(mp_int *rop, size_t count, int order, size_t size,
 
    for (i = 0; i < count; ++i) {
       for (j = 0; j < (size - nail_bytes); ++j) {
-         unsigned char byte = *((unsigned char *)op +
+         unsigned char byte = *((const unsigned char *)op +
                                 (((order == 1) ? i : ((count - 1u) - i)) * size) +
                                 ((endian == 1) ? (j + nail_bytes) : (((size - 1u) - j) - nail_bytes)));