Re: [PATCH 1/2] base64: Null terminate encoding

Denis Kenzior <denkenz at gmail.com>
Newsgroups dev.linux.lists.ell
Message-ID <[email protected]>
Hi James,

On 11/17/21 3:49 PM, James Prestwood wrote:
> l_base64_encode was returning a char* without any NULL terminator. This
> appeared to be written to satisfy the only use in ELL (pem.c) but made
> for a confusing public API. Anyone using this API would expect a char*
> return to be NULL terminated.
> 
> Now l_base64_encode will NULL terminate which also removes the need for
> the length out parameter.
> 
> pem.c was updated to use strlen rather than rely on the out parameter.
> ---
>   ell/base64.c | 8 ++++----
>   ell/base64.h | 3 +--
>   ell/pem.c    | 3 ++-
>   3 files changed, 7 insertions(+), 7 deletions(-)
> 

Both applied, thanks.

Regards,
-Denis
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.