diff options
author | mpech <mpech@openbsd.org> | 2001-10-24 13:06:35 +0000 |
---|---|---|
committer | mpech <mpech@openbsd.org> | 2001-10-24 13:06:35 +0000 |
commit | d52e83b8225c9c79c586fcb043fa9ab2ac5653de (patch) | |
tree | d7597fb07fbdb3fa44b8b4c265c3d1e3c2faab7d /usr.sbin/tokeninit | |
parent | Avoid segv with some radius traffic. Fixes PR# 2135. (diff) | |
download | wireguard-openbsd-d52e83b8225c9c79c586fcb043fa9ab2ac5653de.tar.xz wireguard-openbsd-d52e83b8225c9c79c586fcb043fa9ab2ac5653de.zip |
getopt(3) returns -1 when out of args, not EOF.
millert@ ok
Diffstat (limited to 'usr.sbin/tokeninit')
-rw-r--r-- | usr.sbin/tokeninit/tokeninit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/tokeninit/tokeninit.c b/usr.sbin/tokeninit/tokeninit.c index 97f220f535b..2e56de30d05 100644 --- a/usr.sbin/tokeninit/tokeninit.c +++ b/usr.sbin/tokeninit/tokeninit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tokeninit.c,v 1.2 2000/12/20 20:08:22 markus Exp $ */ +/* $OpenBSD: tokeninit.c,v 1.3 2001/10/24 13:06:36 mpech Exp $ */ /*- * Copyright (c) 1995 Migration Associates Corp. All Rights Reserved @@ -89,7 +89,7 @@ main(int argc, char **argv) else optstr = "fm:sv"; - while ((c = getopt(argc, argv, optstr)) != EOF) + while ((c = getopt(argc, argv, optstr)) != -1) switch (c) { case 'f': /* force initialize existing user account */ cmd |= TOKEN_FORCEINIT; |