=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/sudo/Attic/tgetpass.c,v retrieving revision 1.2 retrieving revision 1.3 diff -c -r1.2 -r1.3 *** src/usr.bin/sudo/Attic/tgetpass.c 1999/12/10 06:45:12 1.2 --- src/usr.bin/sudo/Attic/tgetpass.c 2000/01/24 04:22:53 1.3 *************** *** 1,5 **** /* ! * Copyright (c) 1996, 1998, 1999 Todd C. Miller * All rights reserved. * * Redistribution and use in source and binary forms, with or without --- 1,5 ---- /* ! * Copyright (c) 1996, 1998-2000 Todd C. Miller * All rights reserved. * * Redistribution and use in source and binary forms, with or without *************** *** 78,84 **** #endif /* TCSASOFT */ #ifndef lint ! static const char rcsid[] = "$Sudo: tgetpass.c,v 1.91 1999/12/05 02:18:47 millert Exp $"; #endif /* lint */ static char *tgetline __P((int, char *, size_t, int)); --- 78,84 ---- #endif /* TCSASOFT */ #ifndef lint ! static const char rcsid[] = "$Sudo: tgetpass.c,v 1.93 2000/01/17 23:46:26 millert Exp $"; #endif /* lint */ static char *tgetline __P((int, char *, size_t, int)); *************** *** 216,229 **** /* Read a character, exit loop on error, EOF or EOL */ n = read(fd, &c, 1); ! if (n != 1 || c == '\n') break; *cp++ = c; } free(readfds); } else { /* Keep reading until out of space, EOF, error, or newline */ ! while (--left && (n = read(fd, &c, 1)) == 1 && c != '\n') *cp++ = c; } *cp = '\0'; --- 216,229 ---- /* Read a character, exit loop on error, EOF or EOL */ n = read(fd, &c, 1); ! if (n != 1 || c == '\n' || c == '\r') break; *cp++ = c; } 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')) *cp++ = c; } *cp = '\0';