summaryrefslogtreecommitdiffstats
path: root/net-im/telegram/files/patch-tgl_mtproto-utils.c
diff options
context:
space:
mode:
authorcpm <cpm@FreeBSD.org>2016-12-27 14:01:27 +0000
committercpm <cpm@FreeBSD.org>2016-12-27 14:01:27 +0000
commitbe7be92573f25fc18b7d2c889377e37b3d65527e (patch)
tree6bc5740833789439cc135444d3a71bb0bcc30f38 /net-im/telegram/files/patch-tgl_mtproto-utils.c
parenta7369ce01e8460da145a971ad56f949926094cd5 (diff)
downloadFreeBSD-ports-be7be92573f25fc18b7d2c889377e37b3d65527e.zip
FreeBSD-ports-be7be92573f25fc18b7d2c889377e37b3d65527e.tar.gz
net-im/telegram: Update to 1.4.1.g20161227
- Update telegram 1.3.1 -> 1.4.1.g20161227 PR: 215064 Reported by: Matthias Apitz <guru@unixarea.de> Reviewed by: amdmi3 Approved by: amdmi3, feld (mentors)
Diffstat (limited to 'net-im/telegram/files/patch-tgl_mtproto-utils.c')
-rw-r--r--net-im/telegram/files/patch-tgl_mtproto-utils.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/net-im/telegram/files/patch-tgl_mtproto-utils.c b/net-im/telegram/files/patch-tgl_mtproto-utils.c
new file mode 100644
index 0000000..a974a96
--- /dev/null
+++ b/net-im/telegram/files/patch-tgl_mtproto-utils.c
@@ -0,0 +1,22 @@
+--- tgl/mtproto-utils.c.orig 2016-03-23 11:42:06 UTC
++++ tgl/mtproto-utils.c
+@@ -98,9 +98,7 @@ static unsigned long long BN2ull (TGLC_b
+ if (sizeof (unsigned long) == 8) {
+ return TGLC_bn_get_word (b);
+ } else if (sizeof (unsigned long long) == 8) {
+- assert (0); // As long as nobody ever uses this code, assume it is broken.
+ unsigned long long tmp;
+- /* Here be dragons, but it should be okay due to be64toh */
+ TGLC_bn_bn2bin (b, (unsigned char *) &tmp);
+ return be64toh (tmp);
+ } else {
+@@ -112,9 +110,7 @@ static void ull2BN (TGLC_bn *b, unsigned
+ if (sizeof (unsigned long) == 8 || val < (1ll << 32)) {
+ TGLC_bn_set_word (b, val);
+ } else if (sizeof (unsigned long long) == 8) {
+- assert (0); // As long as nobody ever uses this code, assume it is broken.
+ htobe64(val);
+- /* Here be dragons, but it should be okay due to htobe64 */
+ TGLC_bn_bin2bn ((unsigned char *) &val, 8, b);
+ } else {
+ assert (0);
OpenPOWER on IntegriCloud