[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()


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


Archive administrator: postmaster@lists.cynapses.org