Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lws_b64_decode_stateful truncates response
Addresses issue warmcat#2855 by allowing the parsing of the final byte when there are at least 3 bytes remaining in the buffer. For every 4 bytes of input, a maximum of 3 bytes of output are generated when decoding the base64 string. The buffer space, therefore, only requires an additional 3 bytes of space. The code checks for space in the buffer before adding null termination.
- Loading branch information