Commit 2719cd8e authored by Niels Möller's avatar Niels Möller
Browse files

Bug fix.

Rev: src/read_packet.c:1.12
parent 7d9e1edb
......@@ -129,16 +129,23 @@ int do_read_packet(struct read_handler **h,
}
/* Allocate full packet */
closure->buffer = ssh_format("%ls%lr",
block_size - 4,
closure->buffer->data + 4,
length, &closure->crypt_pos);
{
int done = block_size - 4;
closure->buffer
= ssh_format("%ls%lr",
done,
closure->buffer->data + 4,
length - done,
&closure->crypt_pos);
/* FIXME: Is this needed anywhere? */
closure->buffer->sequence_number = closure->sequence_number++;
/* FIXME: Is this needed anywhere? */
closure->buffer->sequence_number
= closure->sequence_number++;
closure->pos = 4;
closure->state = WAIT_CONTENTS;
closure->pos = done;
closure->state = WAIT_CONTENTS;
}
/* Fall through */
}
else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment