diff options
Diffstat (limited to 'main/utils.c')
-rw-r--r-- | main/utils.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/main/utils.c b/main/utils.c index a4b0a4557..80fadfdcc 100644 --- a/main/utils.c +++ b/main/utils.c @@ -352,6 +352,9 @@ 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; } |