projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
521cb40
)
libceph: Fix base64-decoding when input ends in newline.
author
Tommi Virtanen
<tommi.virtanen@dreamhost.com>
Wed, 2 Feb 2011 19:39:32 +0000
(11:39 -0800)
committer
Sage Weil
<sage@newdream.net>
Tue, 15 Mar 2011 16:14:02 +0000
(09:14 -0700)
It used to return -EINVAL because it thought the end was not aligned
to 4 bytes.
Clean up superfluous src < end test in if, the while itself guarantees
that.
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
Signed-off-by: Sage Weil <sage@newdream.net>
net/ceph/armor.c
patch
|
blob
|
history
diff --git
a/net/ceph/armor.c
b/net/ceph/armor.c
index eb2a666b0be7011e9b27618c62060416543cb706..1fc1ee11dfa28088f00becf58d7c22fd2420cb36 100644
(file)
--- a/
net/ceph/armor.c
+++ b/
net/ceph/armor.c
@@
-78,8
+78,10
@@
int ceph_unarmor(char *dst, const char *src, const char *end)
while (src < end) {
int a, b, c, d;
- if (src
< end && src[0] == '\n')
+ if (src
[0] == '\n') {
src++;
+ continue;
+ }
if (src + 4 > end)
return -EINVAL;
a = decode_bits(src[0]);