projects
/
oweals
/
tinc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f134bd0
)
Fix return value of b64encode().
author
Guus Sliepen
<guus@sliepen.org>
Sun, 6 Apr 2014 20:46:06 +0000
(22:46 +0200)
committer
Guus Sliepen
<guus@sliepen.org>
Sun, 6 Apr 2014 20:46:06 +0000
(22:46 +0200)
src/utils.c
patch
|
blob
|
history
diff --git
a/src/utils.c
b/src/utils.c
index edaa354fdf905a08e9902be3cfd2cea9fe096aeb..510dd2fc197937d4d0c0ccc7ababa90271656c6a 100644
(file)
--- a/
src/utils.c
+++ b/
src/utils.c
@@
-112,14
+112,14
@@
static int b64encode_internal(const char *src, char *dst, int length, const char
dst[di + 1] = alphabet[triplet & 63]; triplet >>= 6;
dst[di + 2] = alphabet[triplet];
dst[di + 3] = 0;
- length = di +
2
;
+ length = di +
3
;
break;
case 1:
triplet = usrc[si];
dst[di] = alphabet[triplet & 63]; triplet >>= 6;
dst[di + 1] = alphabet[triplet];
dst[di + 2] = 0;
- length = di +
1
;
+ length = di +
2
;
break;
default:
dst[di] = 0;