aboutsummaryrefslogtreecommitdiff
path: root/net-p2p/bnbt
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2017-02-01 20:22:34 +0000
committerJan Beich <jbeich@FreeBSD.org>2017-02-01 20:22:34 +0000
commit42040b1790f0ec00a027bd7792c306c9d8533e96 (patch)
tree7791189f79d8a20019d636a7f3d919ab0891c7aa /net-p2p/bnbt
parent52f91af65cbf1fe48f19e522d7cf81b6277c0d06 (diff)
downloadports-42040b1790f0ec00a027bd7792c306c9d8533e96.tar.gz
ports-42040b1790f0ec00a027bd7792c306c9d8533e96.zip
Notes
Diffstat (limited to 'net-p2p/bnbt')
-rw-r--r--net-p2p/bnbt/Makefile2
-rw-r--r--net-p2p/bnbt/files/patch-base64.cpp26
2 files changed, 27 insertions, 1 deletions
diff --git a/net-p2p/bnbt/Makefile b/net-p2p/bnbt/Makefile
index bc71c2b9f2fe..bb52172ecbfa 100644
--- a/net-p2p/bnbt/Makefile
+++ b/net-p2p/bnbt/Makefile
@@ -3,7 +3,7 @@
PORTNAME= bnbt
PORTVERSION= 8.5
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= net-p2p
MASTER_SITES= http://opensource.depthstrike.com/${PORTNAME}/
DISTNAME= ${SNAPSHOT}-${PORTNAME}${PORTVERSION:C/\.//}-src
diff --git a/net-p2p/bnbt/files/patch-base64.cpp b/net-p2p/bnbt/files/patch-base64.cpp
new file mode 100644
index 000000000000..51948c46fa82
--- /dev/null
+++ b/net-p2p/bnbt/files/patch-base64.cpp
@@ -0,0 +1,26 @@
+--- base64.cpp.orig 2017-02-01 19:29:59 UTC
++++ base64.cpp
+@@ -114,6 +114,7 @@ uchar pBase64[] = {
+ char *b64decode(const char *s)
+ {
+ int l = strlen(s); // Get length of Base64 string.
++ const char *p; // Separator position
+ char *b; // Decoding buffer pointers.
+ uchar c = 0; // Character to decode.
+ int x = 0; // General purpose integers.
+@@ -126,12 +127,12 @@ char *b64decode(const char *s)
+ if (l % 4) // If it's not modulo 4, then it...
+ return b64isnot(NULL); // ...can't be a Base64 string.
+
+- if ((b = strchr(s, pPad[0])) != NULL) // Only one, two or three equal...
++ if ((p = strchr(s, pPad[0])) != NULL) // Only one, two or three equal...
+ { // ...'=' signs are allowed at...
+- if ((b - s) < (l - 3)) // ...the end of the Base64 string.
++ if ((p - s) < (l - 3)) // ...the end of the Base64 string.
+ return b64isnot(NULL); // Any other equal '=' signs are...
+ else // ...invalid.
+- if (strncmp(b, (const char *) pPad + 3 - (s + l - b), s + l - b))
++ if (strncmp(p, (const char *) pPad + 3 - (s + l - p), s + l - p))
+ return b64isnot(NULL);
+ }
+