projects
/
libjh.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a135cb2
)
fix base64: add terminating nullbyte
author
Jann Horn
<jann@thejh.net>
Sat, 27 Jul 2013 10:21:23 +0000
(12:21 +0200)
committer
Jann Horn
<jann@thejh.net>
Sat, 27 Jul 2013 10:21:23 +0000
(12:21 +0200)
base64.c
patch
|
blob
|
history
diff --git
a/base64.c
b/base64.c
index
3d70903
..
2ad5eb7
100644
(file)
--- a/
base64.c
+++ b/
base64.c
@@
-12,7
+12,7
@@
static char b64_encchr(unsigned char c) {
// hold the base64-encoded form of the input.
PUBLIC_FN void base64_encode(char *dst, unsigned char *src, size_t len) {
start:;
- if (len == 0)
return;
+ if (len == 0)
{ *dst = '\0'; return; }
unsigned char a=src[0], b=0, c=0;
len--, src++;
int eqsigns = (len<2)?(2-len):0;