This value was never read after being set
ssize_t to long
Clean up memory leaks in failure conditions

Some pointers were not freed when returning early due to an error. Fixed that.
Update copyright info related to base64_d.c