From: Niels Möller Date: Fri, 7 Feb 2014 08:16:44 +0000 (+0100) Subject: sexp_transport_iterator_first: Updated base64 decoding. X-Git-Tag: nettle_3.0_release_20140607~140 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e6ecd59170f11036b6b5f297cef4b2bbbb6270f5;p=thirdparty%2Fnettle.git sexp_transport_iterator_first: Updated base64 decoding. --- diff --git a/ChangeLog b/ChangeLog index 1ae5c90b..3681604c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2014-02-07 Niels Möller + * sexp-transport.c (sexp_transport_iterator_first): For + base64_decode_update, omit initialization of coded_length. + * base64-decode.c (base64_decode_update): Use *dst_length for output only. Don't require callers to pass a sane value. * base16-decode.c (base16_decode_update): Likewise. diff --git a/sexp-transport.c b/sexp-transport.c index e65832f3..ecf5eaa7 100644 --- a/sexp-transport.c +++ b/sexp-transport.c @@ -74,10 +74,9 @@ sexp_transport_iterator_first(struct sexp_iterator *iterator, return 0; base64_decode_init(&ctx); - coded_length = end - in; if (base64_decode_update(&ctx, &coded_length, input + out, - coded_length, input + in) + end - in, input + in) && base64_decode_final(&ctx)) { out += coded_length;