git.samba.org
/
nivanova
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8975dde
)
Fix decoding of base64. We got the length wrong when the result was not
author
Volker Lendecke
<vlendec@samba.org>
Fri, 23 Jan 2004 12:04:07 +0000
(12:04 +0000)
committer
Volker Lendecke
<vlendec@samba.org>
Fri, 23 Jan 2004 12:04:07 +0000
(12:04 +0000)
an exact multiple of 3.
I also wrote a torture test and it survived some minutes of random stuff
coded/decoded up to 16 MB data. But that would be a bit too embarassing to
commit... :-)
Volker
(This used to be commit
6d22f0d8c36bea618ad0adf4eefc2f5a37cb3fda
)
source3/lib/util_str.c
patch
|
blob
|
history
diff --git
a/source3/lib/util_str.c
b/source3/lib/util_str.c
index d93f39696f4862234b1ff9a4313f40cf83310a56..822ab2062869f84dc0d6479e2c5c47ad1db58e7e 100644
(file)
--- a/
source3/lib/util_str.c
+++ b/
source3/lib/util_str.c
@@
-1838,6
+1838,8
@@
DATA_BLOB base64_decode_data_blob(const char *s)
s++; i++;
}
+ if (*s == '=') n -= 1;
+
/* fix up length */
decoded.length = n;
return decoded;