diff --git a/ChangeLog b/ChangeLog
index 1ae5c90b769d1518924e0008aa1cc62cb4e7ece0..3681604ce0c8004759528d83516db6fc75160e0b 100644
--- 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.
diff --git a/sexp-transport.c b/sexp-transport.c
index e65832f3ed3e5ea9996fbb70cc2422407a1213d5..ecf5eaa7fc9ec423ec3bdffccd410c949b2d897d 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;