aboutsummaryrefslogtreecommitdiff
path: root/src/pki_gcrypt.c
diff options
context:
space:
mode:
authorFabiano FidĂȘncio <fidencio@redhat.com>2015-09-25 01:18:38 +0200
committerFabiano FidĂȘncio <fidencio@redhat.com>2016-01-19 11:31:08 +0100
commit25707e97520c7787f0a742dea419afca4c8cad41 (patch)
treed1575812c4f831b469feefdf2850c930cbcb956f /src/pki_gcrypt.c
parent9774b1062d8d8899f58923f4dad07b9868c0b3a8 (diff)
downloadlibssh-25707e97520c7787f0a742dea419afca4c8cad41.tar.gz
libssh-25707e97520c7787f0a742dea419afca4c8cad41.tar.xz
libssh-25707e97520c7787f0a742dea419afca4c8cad41.zip
pki_gcrypt: adapt to the new behavior of ssh_buffer_get_len()
Signed-off-by: Fabiano FidĂȘncio <fidencio@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'src/pki_gcrypt.c')
-rw-r--r--src/pki_gcrypt.c4
1 files 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++)