diff options
author | mnicholson <mnicholson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-11-06 20:42:05 +0000 |
---|---|---|
committer | mnicholson <mnicholson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-11-06 20:42:05 +0000 |
commit | 26d2b763945787b7d04485d50f65730202ea2f51 (patch) | |
tree | 5d357e7663603ae0d6d3f189f84abb3923b8ae3e /main | |
parent | 9601ec146fe6ca953aa26939e383ab5e5d24b1b2 (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.0@228651 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-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 d5d1bb0d2..f55fe4271 100644 --- a/main/utils.c +++ b/main/utils.c @@ -264,7 +264,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; |