While updating the destination pointer, we were also adding the padded
bytes which are not a part of the decoded bytes. This led to running out
of space on the destination buffer.
Fix it by only incrementing destination buffer ptr by the number of
actual bytes that were decoded.
Ticket 5623
Ticket 5694
/* Decode base-64 block into ascii block and move pointer */
DecodeBase64Block(dptr, b64);
- dptr += ASCII_BLOCK;
+ dptr += numDecoded_blk;
*decoded_bytes += numDecoded_blk;
/* Reset base-64 block and index */
bbidx = 0;