Commit fce2966e25f962ec82a05636eec515fb24eeb938

Daniel Mendler 2019-03-22T15:34:59

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)));