diff options
author | Matthew Nicholson <mnicholson@digium.com> | 2009-11-06 19:47:11 +0000 |
---|---|---|
committer | Matthew Nicholson <mnicholson@digium.com> | 2009-11-06 19:47:11 +0000 |
commit | f44f8650cbaef8b8beb0c0b926bbdd87c19a2485 (patch) | |
tree | edcd43288e61877461ed49d2d340ff16f0760267 /main/utils.c | |
parent | c17525391b8ced28e91470ecaeda96f2a15e399f (diff) |
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: https://origsvn.digium.com/svn/asterisk/trunk@228620 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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 b50fabc0b..e0005a6b7 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; |