diff options
author | mnicholson <mnicholson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-11-06 20:26:17 +0000 |
---|---|---|
committer | mnicholson <mnicholson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-11-06 20:26:17 +0000 |
commit | 4b1113e84ae886d14ba1efb8d13178accd23bce2 (patch) | |
tree | d62aad5d2b7fea7a56bef178294f5a62fd30b0ee /main/utils.c | |
parent | c0becafa2d07e09addd2a7a21b1bdef5eaf32fa9 (diff) |
Merged revisions 228620 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r228620 | mnicholson | 2009-11-06 13:47:11 -0600 (Fri, 06 Nov 2009) | 15 lines
Merged revisions 228378 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r228378 | mnicholson | 2009-11-06 10:26:59 -0600 (Fri, 06 Nov 2009) | 8 lines
Properly handle '=' while decoding base64 messages and null terminate strings returned from BASE64_DECODE.
(closes issue #15271)
Reported by: chappell
Patches:
base64_fix.patch uploaded by chappell (license 8)
Tested by: kobaz
........
................
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@228649 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/utils.c')
-rw-r--r-- | main/utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/main/utils.c b/main/utils.c index 00badfa88..f71c2db41 100644 --- a/main/utils.c +++ b/main/utils.c @@ -267,7 +267,7 @@ int ast_base64decode(unsigned char *dst, const char *src, int max) unsigned int byte = 0; unsigned int bits = 0; int incnt = 0; - while (*src && (cnt < max)) { + while(*src && *src != '=' && (cnt < max)) { /* Shift in 6 bits of input */ byte <<= 6; byte |= (b2a[(int)(*src)]) & 0x3f; |