Skip to content
Snippets Groups Projects
Commit ee5769f3 authored by Matt Johnston's avatar Matt Johnston
Browse files

avoid NULL argument to base64 decode

--HG--
branch : fuzz
parent 3a8517b0
Branches
No related merge requests found
...@@ -577,6 +577,10 @@ int cmp_base64_key(const unsigned char* keyblob, unsigned int keybloblen, ...@@ -577,6 +577,10 @@ int cmp_base64_key(const unsigned char* keyblob, unsigned int keybloblen,
/* now we have the actual data */ /* now we have the actual data */
len = line->len - line->pos; 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 */ decodekeylen = len * 2; /* big to be safe */
decodekey = buf_new(decodekeylen); decodekey = buf_new(decodekeylen);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment