diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-10-18 04:40:52 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-10-18 04:40:52 +0000 |
commit | 72c93651b0a1f1f1c7bc68916c14966b843e5272 (patch) | |
tree | d81fc77654c16f61c96b86f8db65e02c3dbdd7ca | |
parent | 0bbfd161a0c845d77ba5bec35efda3f302225f85 (diff) |
Revert a change that I made for issue #10979 which, as has been pointed out to
me in issue #11018, doesn't really make sense. There is no reason to have
the base64 decode function force a '\0' terminated buffer, when the result is
almost always binary, anyway. In fact, this caused some breakage, as some code
in res_crypto passed in a buffer exactly the right size to get its binary
result, which got stomped on by this patch.
(closes issue #11018, reported by dimas)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@86237 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | main/utils.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/main/utils.c b/main/utils.c index c4abd0f37..fe9ee3cff 100644 --- a/main/utils.c +++ b/main/utils.c @@ -347,9 +347,6 @@ int ast_base64decode(unsigned char *dst, const char *src, int max) cnt++; } } - if (cnt == max) - dst--; - *dst = '\0'; /* Dont worry about left over bits, they're extra anyway */ return cnt; } |