[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 16/24] pki_gcrypt: adapt to the new behavior of ssh_buffer_get_len()
[Thread Prev] | [Thread Next]
- Subject: [PATCH 16/24] pki_gcrypt: adapt to the new behavior of ssh_buffer_get_len()
- From: Fabiano Fidêncio <fidencio@xxxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Mon, 18 Jan 2016 10:06:57 +0100
- To: libssh@xxxxxxxxxx
- Cc: Fabiano Fidêncio <fidencio@xxxxxxxxxx>
Signed-off-by: Fabiano Fidêncio <fidencio@xxxxxxxxxx> --- src/pki_gcrypt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pki_gcrypt.c b/src/pki_gcrypt.c index 885cc5b..cf783cb 100644 --- a/src/pki_gcrypt.c +++ b/src/pki_gcrypt.c @@ -150,8 +150,8 @@ static int asn1_check_sequence(ssh_buffer buffer) { } size = asn1_get_len(buffer); - if ((padding = ssh_buffer_get_len(buffer) - buffer->pos - size) > 0) { - for (i = ssh_buffer_get_len(buffer) - buffer->pos - size, + if ((padding = ssh_buffer_get_len(buffer) - size) > 0) { + for (i = ssh_buffer_get_len(buffer) - size, j = (unsigned char*)ssh_buffer_get_begin(buffer) + size + buffer->pos; i; i--, j++) -- 2.5.0
[PATCH 00/24] clean up + expose some buffer functions (the ones necessary for writing an ssh-agent). | Fabiano Fidêncio <fidencio@xxxxxxxxxx> |