=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ftp/ruserpass.c,v retrieving revision 1.22 retrieving revision 1.23 diff -c -r1.22 -r1.23 *** src/usr.bin/ftp/ruserpass.c 2007/03/22 15:25:17 1.22 --- src/usr.bin/ftp/ruserpass.c 2007/03/24 14:29:02 1.23 *************** *** 1,4 **** ! /* $OpenBSD: ruserpass.c,v 1.22 2007/03/22 15:25:17 moritz Exp $ */ /* $NetBSD: ruserpass.c,v 1.14 1997/07/20 09:46:01 lukem Exp $ */ /* --- 1,4 ---- ! /* $OpenBSD: ruserpass.c,v 1.23 2007/03/24 14:29:02 moritz Exp $ */ /* $NetBSD: ruserpass.c,v 1.14 1997/07/20 09:46:01 lukem Exp $ */ /* *************** *** 35,41 **** static char sccsid[] = "@(#)ruserpass.c 8.4 (Berkeley) 4/27/95"; #else #ifndef SMALL ! static const char rcsid[] = "$OpenBSD: ruserpass.c,v 1.22 2007/03/22 15:25:17 moritz Exp $"; #endif /* SMALL */ #endif #endif /* not lint */ --- 35,41 ---- static char sccsid[] = "@(#)ruserpass.c 8.4 (Berkeley) 4/27/95"; #else #ifndef SMALL ! static const char rcsid[] = "$OpenBSD: ruserpass.c,v 1.23 2007/03/24 14:29:02 moritz Exp $"; #endif /* SMALL */ #endif #endif /* not lint */ *************** *** 83,89 **** int ruserpass(const char *host, char **aname, char **apass, char **aacct) { ! char *hdir, buf[BUFSIZ], *tmp; char myname[MAXHOSTNAMELEN], *mydomain; int t, i, c, usedefault = 0; struct stat stb; --- 83,89 ---- int ruserpass(const char *host, char **aname, char **apass, char **aacct) { ! char *hdir, buf[MAXPATHLEN], *tmp; char myname[MAXHOSTNAMELEN], *mydomain; int t, i, c, usedefault = 0; struct stat stb; *************** *** 236,244 **** } *tmp = c; if (*tmp == '\n') { ! if (*(tmp-1) == '\0') { ! macros[macnum++].mac_end = tmp - 1; ! break; } *tmp = '\0'; } --- 236,248 ---- } *tmp = c; if (*tmp == '\n') { ! if (tmp == macros[macnum].mac_start) { ! macros[macnum++].mac_end = tmp; ! break; ! } else if (*(tmp-1) == '\0') { ! macros[macnum++].mac_end = ! tmp - 1; ! break; } *tmp = '\0'; }