From 25707e97520c7787f0a742dea419afca4c8cad41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Fri, 25 Sep 2015 01:18:38 +0200 Subject: [PATCH] pki_gcrypt: adapt to the new behavior of ssh_buffer_get_len() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fabiano FidĂȘncio Reviewed-by: Andreas Schneider --- 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 885cc5be..cf783cb5 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++)