Displaying 1 result from an estimated 1 matches for "udst".
Did you mean:
dst
2017 Aug 30
1
non-standard base64 functions in tinc 1.1
...This will break existing key files, though, which is
unfortunate.
- todd
diff --git a/src/utils.c b/src/utils.c
index fadfd05..43d4840 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -75,14 +75,14 @@ int b64decode(const char *src, void *dst, int length) {
uint32_t triplet = 0;
unsigned char *udst = (unsigned char *)dst;
- for(i = 0; i < length && src[i]; i++) {
- triplet |= base64_decode[src[i] & 0xff] << (6 * (i & 3));
+ for(i = 0; i < length && src[i] && src[i] != '='; i++) {
+ triplet = (triplet << 6) | base64_decode[src[i] &a...