Line 0
Link Here
|
|
|
1 |
--- tgl/mtproto-utils.c.orig 2016-03-23 11:42:06 UTC |
2 |
+++ tgl/mtproto-utils.c |
3 |
@@ -98,9 +98,7 @@ static unsigned long long BN2ull (TGLC_b |
4 |
if (sizeof (unsigned long) == 8) { |
5 |
return TGLC_bn_get_word (b); |
6 |
} else if (sizeof (unsigned long long) == 8) { |
7 |
- assert (0); // As long as nobody ever uses this code, assume it is broken. |
8 |
unsigned long long tmp; |
9 |
- /* Here be dragons, but it should be okay due to be64toh */ |
10 |
TGLC_bn_bn2bin (b, (unsigned char *) &tmp); |
11 |
return be64toh (tmp); |
12 |
} else { |
13 |
@@ -112,9 +110,7 @@ static void ull2BN (TGLC_bn *b, unsigned |
14 |
if (sizeof (unsigned long) == 8 || val < (1ll << 32)) { |
15 |
TGLC_bn_set_word (b, val); |
16 |
} else if (sizeof (unsigned long long) == 8) { |
17 |
- assert (0); // As long as nobody ever uses this code, assume it is broken. |
18 |
htobe64(val); |
19 |
- /* Here be dragons, but it should be okay due to htobe64 */ |
20 |
TGLC_bn_bin2bn ((unsigned char *) &val, 8, b); |
21 |
} else { |
22 |
assert (0); |