ddc3d4ca5a
int getline(FILE *stream, char *buf, size_t buflen, const char **errormsg) Read a line from the FILE stream into buf/buflen using fgets(), so up to buflen-1 chars will be read and the result will be NUL terminated. If the line has a trailing newline it will be removed. If the line is too long, excess characters will be read until newline/EOF/error. Various -ve return values indicate different errors, and errormsg will be changed to an error description if it's not NULL. Convert to use getline() instead of fgets() whenever reading user input to ensure that an overly long input line doesn't leave excess characters for the next input operation to accidentally use as input. Zero out the password & account after we've finished with it. Consistently use getpass(3) (i.e, character echo suppressed) when reading the account data. For some reason, historically the "login" code suppressed echo for Account: yet the "user" command did not! Display the hostname in the "getaddrinfo failed" warning. Appease some -Wcast-qual warnings. Fixing all of these requires significant code refactoring. (mmm, legacy code). |
||
---|---|---|
.. | ||
cmds.c | ||
cmdtab.c | ||
complete.c | ||
domacro.c | ||
extern.h | ||
fetch.c | ||
ftp_var.h | ||
ftp.1 | ||
ftp.c | ||
main.c | ||
Makefile | ||
progressbar.c | ||
progressbar.h | ||
ruserpass.c | ||
util.c | ||
version.h |