summaryrefslogtreecommitdiffhomepage
path: root/signkey.c
diff options
context:
space:
mode:
Diffstat (limited to 'signkey.c')
-rw-r--r--signkey.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/signkey.c b/signkey.c
index 3d78e35..19a2c08 100644
--- a/signkey.c
+++ b/signkey.c
@@ -577,6 +577,10 @@ int cmp_base64_key(const unsigned char* keyblob, unsigned int keybloblen,
/* now we have the actual data */
len = line->len - line->pos;
+ if (len == 0) {
+ /* base64_decode doesn't like NULL argument */
+ return DROPBEAR_FAILURE;
+ }
decodekeylen = len * 2; /* big to be safe */
decodekey = buf_new(decodekeylen);