mirror of
https://github.com/samba-team/samba.git
synced 2025-08-04 08:22:08 +03:00
committed by
Gerald (Jerry) Carter
parent
66275bd3bc
commit
afe2d4c493
@ -147,8 +147,10 @@ char *getsmbpass(const char *prompt)
|
|||||||
fgets(buf, bufsize, in);
|
fgets(buf, bufsize, in);
|
||||||
}
|
}
|
||||||
nread = strlen(buf);
|
nread = strlen(buf);
|
||||||
if (buf[nread - 1] == '\n')
|
if (nread) {
|
||||||
buf[nread - 1] = '\0';
|
if (buf[nread - 1] == '\n')
|
||||||
|
buf[nread - 1] = '\0';
|
||||||
|
}
|
||||||
|
|
||||||
/* Restore echoing. */
|
/* Restore echoing. */
|
||||||
if (echo_off) {
|
if (echo_off) {
|
||||||
|
Reference in New Issue
Block a user