summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabiano Fidêncio <fidencio@redhat.com>2015-09-25 01:18:38 +0200
committerFabiano Fidêncio <fidencio@redhat.com>2015-10-12 13:56:21 +0200
commitc12915e5037fe37fabf17126e57f08e5c4a49971 (patch)
tree1548bae08b5f542c7d8b3061a9989b5433a9fda3
parent397782ac2f31c3dbb960522802a1345e6a4aab9a (diff)
downloadlibssh-c12915e5037fe37fabf17126e57f08e5c4a49971.tar.gz
libssh-c12915e5037fe37fabf17126e57f08e5c4a49971.tar.xz
libssh-c12915e5037fe37fabf17126e57f08e5c4a49971.zip
pki_gcrypt: adapt to the new behavior of ssh_buffer_get_len()
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
-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 5be0388a..6dadf3f8 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++)