summaryrefslogtreecommitdiffhomepage
path: root/signkey.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2020-10-24 18:56:45 +0800
committerMatt Johnston <matt@ucc.asn.au>2020-10-24 18:56:45 +0800
commit037d26f055e4818616ffe5c8c3597451550e59e6 (patch)
tree05cd06345540cda5953fade41d3071a8a8d73c2d /signkey.c
parent1a208c460b412113704c4d5f98585017ee0a6ccf (diff)
Add buf_decrpos()
Diffstat (limited to 'signkey.c')
-rw-r--r--signkey.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/signkey.c b/signkey.c
index 92fe6a2..1f9b682 100644
--- a/signkey.c
+++ b/signkey.c
@@ -235,7 +235,7 @@ int buf_get_pub_key(buffer *buf, sign_key *key, enum signkey_type *type) {
*type = keytype;
/* Rewind the buffer back before "ssh-rsa" etc */
- buf_incrpos(buf, -len - 4);
+ buf_decrpos(buf, len + 4);
#if DROPBEAR_DSS
if (keytype == DROPBEAR_SIGNKEY_DSS) {
@@ -316,7 +316,7 @@ int buf_get_priv_key(buffer *buf, sign_key *key, enum signkey_type *type) {
*type = keytype;
/* Rewind the buffer back before "ssh-rsa" etc */
- buf_incrpos(buf, -len - 4);
+ buf_decrpos(buf, len + 4);
#if DROPBEAR_DSS
if (keytype == DROPBEAR_SIGNKEY_DSS) {