]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
sexp_transport_iterator_first: Updated base64 decoding.
authorNiels Möller <nisse@lysator.liu.se>
Fri, 7 Feb 2014 08:16:44 +0000 (09:16 +0100)
committerNiels Möller <nisse@lysator.liu.se>
Fri, 7 Feb 2014 08:16:44 +0000 (09:16 +0100)
ChangeLog
sexp-transport.c

index 1ae5c90b769d1518924e0008aa1cc62cb4e7ece0..3681604ce0c8004759528d83516db6fc75160e0b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2014-02-07  Niels Möller  <nisse@lysator.liu.se>
 
+       * 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.
index e65832f3ed3e5ea9996fbb70cc2422407a1213d5..ecf5eaa7fc9ec423ec3bdffccd410c949b2d897d 100644 (file)
@@ -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;