mirror of
https://github.com/clearml/dropbear
synced 2025-02-26 05:38:53 +00:00
avoid NULL argument to base64 decode
--HG-- branch : fuzz
This commit is contained in:
parent
3a8517b06f
commit
ee5769f31f
@ -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);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user