]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Revert a change that I made for issue #10979 which, as has been pointed out to
authorRussell Bryant <russell@russellbryant.com>
Thu, 18 Oct 2007 04:40:52 +0000 (04:40 +0000)
committerRussell Bryant <russell@russellbryant.com>
Thu, 18 Oct 2007 04:40:52 +0000 (04:40 +0000)
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: https://origsvn.digium.com/svn/asterisk/branches/1.4@86237 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/utils.c

index c4abd0f372d9b2708764d7de989847e44f103e1b..fe9ee3cffaf7c734162b5d36692bf6083795b8b8 100644 (file)
@@ -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;
 }