diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2003-11-23 19:00:28 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2003-11-23 19:00:28 +0000 |
commit | 62a56a59c9973b8966e9456df7deb5a3ec430b45 (patch) | |
tree | a0037358bb77ba1caabb77bb87a5bc4cf38d94b8 /usr.bin | |
parent | 1a5651b56ffe503dc6769a18bda1e4795e136d85 (diff) |
Check getpass(3) return value. From Jared Yanovich <jjy2+ at pitt dot edu>
ok henning@
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/encrypt/encrypt.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/encrypt/encrypt.c b/usr.bin/encrypt/encrypt.c index 5c0c983fa6f..77507257a06 100644 --- a/usr.bin/encrypt/encrypt.c +++ b/usr.bin/encrypt/encrypt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: encrypt.c,v 1.19 2003/07/02 21:04:09 deraadt Exp $ */ +/* $OpenBSD: encrypt.c,v 1.20 2003/11/23 19:00:27 otto Exp $ */ /* * Copyright (c) 1996, Jason Downs. All rights reserved. @@ -194,7 +194,8 @@ main(int argc, char **argv) char line[BUFSIZ], *string; if (prompt) { - string = getpass("Enter string: "); + if ((string = getpass("Enter string: ")) == NULL) + err(1, "getpass"); print_passwd(string, operation, extra); (void)fputc('\n', stdout); } else { |