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

limit input size

--HG--
branch : fuzz
parent 87c4586d
No related merge requests found
...@@ -195,9 +195,9 @@ static int checkpubkey_line(buffer* line, int line_num, char* filename, ...@@ -195,9 +195,9 @@ static int checkpubkey_line(buffer* line, int line_num, char* filename,
unsigned int pos, len; unsigned int pos, len;
int ret = DROPBEAR_FAILURE; int ret = DROPBEAR_FAILURE;
if (line->len < MIN_AUTHKEYS_LINE) { if (line->len < MIN_AUTHKEYS_LINE || line->len > MAX_AUTHKEYS_LINE) {
TRACE(("checkpubkey: line too short")) TRACE(("checkpubkey: bad line length %d", line->len))
return DROPBEAR_FAILURE; /* line is too short for it to be a valid key */ return DROPBEAR_FAILURE;
} }
/* compare the algorithm. +3 so we have enough bytes to read a space and some base64 characters too. */ /* compare the algorithm. +3 so we have enough bytes to read a space and some base64 characters too. */
......
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