summaryrefslogtreecommitdiff
path: root/sexp-transport.c
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2002-11-07 09:28:36 +0100
committerNiels Möller <nisse@lysator.liu.se>2002-11-07 09:28:36 +0100
commit38f1828df4a4977a9867918ed209bbc0755bc11f (patch)
treee845ad63c765cdd78482fedc10821ee345260bf5 /sexp-transport.c
parentd73ccbc126145f965cc2999bb939d370f5cc1e33 (diff)
downloadnettle-38f1828df4a4977a9867918ed209bbc0755bc11f.tar.gz
(sexp_transport_iterator_first): Fixed bug,
length was mishandled. Rev: src/nettle/sexp-transport.c:1.3
Diffstat (limited to 'sexp-transport.c')
-rw-r--r--sexp-transport.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sexp-transport.c b/sexp-transport.c
index 73e8c876..a0d7b1d3 100644
--- a/sexp-transport.c
+++ b/sexp-transport.c
@@ -60,7 +60,7 @@ sexp_transport_iterator_first(struct sexp_iterator *iterator,
{
/* Found transport encoding */
struct base64_decode_ctx ctx;
- unsigned length;
+ unsigned coded_length;
unsigned end;
for (end = ++in; end < length && input[end] != '}'; end++)
@@ -70,13 +70,13 @@ sexp_transport_iterator_first(struct sexp_iterator *iterator,
return 0;
base64_decode_init(&ctx);
- length = end - in;
+ coded_length = end - in;
- if (base64_decode_update(&ctx, &length, input + out,
- length, input + in)
+ if (base64_decode_update(&ctx, &coded_length, input + out,
+ coded_length, input + in)
&& base64_decode_final(&ctx))
{
- out += length;
+ out += coded_length;
in = end + 1;
}
else