projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use git description as the tinc version.
[tinc]
/
src
/
utils.c
diff --git
a/src/utils.c
b/src/utils.c
index
594c91a
..
0d7bc02
100644
(file)
--- a/
src/utils.c
+++ b/
src/utils.c
@@
-75,7
+75,7
@@
int b64decode(const char *src, void *dst, int length) {
uint32_t triplet = 0;
unsigned char *udst = (unsigned char *)dst;
uint32_t triplet = 0;
unsigned char *udst = (unsigned char *)dst;
- for(i = 0; i < length
/ 3 * 4
&& src[i]; i++) {
+ for(i = 0; i < length && src[i]; i++) {
triplet |= base64_decode[src[i] & 0xff] << (6 * (i & 3));
if((i & 3) == 3) {
if(triplet & 0xff000000U)
triplet |= base64_decode[src[i] & 0xff] << (6 * (i & 3));
if((i & 3) == 3) {
if(triplet & 0xff000000U)