From 897da4ee36a47f4b1757590d92b5747a0267cf01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20PORTAY?= Date: Sat, 2 May 2015 11:37:37 +0200 Subject: [PATCH] Uses k_size as an signed integer buf_incrwritepos() and mp_to_unsigned_bin() functions use k_size as signed integer argument. k_size is also used in an assertion that compared it to curve_size which is a signed long. Only buf_getwriteptr() is using k_size as unsigned. So it safe to use it as signed. --- keyimport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyimport.c b/keyimport.c index 8a0d525..d8c0f5c 100644 --- a/keyimport.c +++ b/keyimport.c @@ -1043,7 +1043,7 @@ static int openssh_write(const char *filename, sign_key *key, int curve_oid_len = 0; const void* curve_oid = NULL; unsigned long pubkey_size = 2*curve_size+1; - unsigned int k_size; + int k_size; int err = 0; /* version. less than 10 bytes */