diff options
author | Matt Johnston <matt@ucc.asn.au> | 2017-05-25 00:09:40 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2017-05-25 00:09:40 +0800 |
commit | ee5769f31fc5bef0c0f5f6977523918af892fa3b (patch) | |
tree | d263671261b31b182902c899cc972f6693376948 /signkey.c | |
parent | 3a8517b06fa64c2052e182733dd1b319566a2315 (diff) |
avoid NULL argument to base64 decode
--HG--
branch : fuzz
Diffstat (limited to 'signkey.c')
-rw-r--r-- | signkey.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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); |