--- /dev/null
+--- a/svr-authpubkey.c
++++ b/svr-authpubkey.c
+@@ -197,7 +197,11 @@ static int checkpubkey_line(buffer* line
+
+ if (line->len < MIN_AUTHKEYS_LINE || line->len > MAX_AUTHKEYS_LINE) {
+ TRACE(("checkpubkey_line: bad line length %d", line->len))
+- return DROPBEAR_FAILURE;
++ goto out;
++ }
++
++ if (memchr(line->data, 0x0, line->len) != NULL) {
++ goto out;
+ }
+
+ /* compare the algorithm. +3 so we have enough bytes to read a space and some base64 characters too. */
--- a/svr-authpubkey.c
+++ b/svr-authpubkey.c
-@@ -320,14 +320,20 @@ static int checkpubkey(const char* algo,
+@@ -324,14 +324,20 @@ static int checkpubkey(const char* algo,
goto out;
}
/* open the file as the authenticating user. */
origuid = getuid();
-@@ -404,26 +410,35 @@ static int checkpubkeyperms() {
+@@ -408,26 +414,35 @@ static int checkpubkeyperms() {
goto out;
}