mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 06:15:37 +00:00
Fixed a bug that caused an infinite loop when the password timeout was disabled.
This commit is contained in:
@@ -223,7 +223,7 @@ tgetline(fd, buf, bufsiz, timeout)
|
||||
free(readfds);
|
||||
} else {
|
||||
/* Keep reading until out of space, EOF, error, or newline */
|
||||
while (--left && (n = read(fd, &c, 1)) == 1 && (c != '\n' || c != '\r'))
|
||||
while (--left && (n = read(fd, &c, 1)) == 1 && c != '\n' && c != '\r')
|
||||
*cp++ = c;
|
||||
}
|
||||
*cp = '\0';
|
||||
|
Reference in New Issue
Block a user