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

Read the last line of a file without a finishing '\n' correctly

--HG--
branch : private-rez
extra : convert_revision : f64591461a40d54a2bd2e12493253ec76eab1ff2
parent 8559be01
No related merge requests found
......@@ -506,18 +506,17 @@ int buf_getline(buffer * line, FILE * authfile) {
out:
buf_setpos(line, 0);
/* if we didn't read anything before EOF or error, exit */
if (c == EOF && line->pos == 0) {
TRACE(("leave getauthline: failure"));
TRACE(("leave buf_getline: failure"));
return DROPBEAR_FAILURE;
} else {
TRACE(("leave getauthline: success"));
TRACE(("leave buf_getline: success"));
buf_setpos(line, 0);
return DROPBEAR_SUCCESS;
}
TRACE(("leave buf_getline"));
}
#endif
......
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