diff options
author | 2003-11-23 19:00:27 +0000 | |
---|---|---|
committer | 2003-11-23 19:00:27 +0000 | |
commit | 53e89f6a2725e525c0db1df5cc9321110aecf619 (patch) | |
tree | 2de91899e33fcfbfee356fdb3ebd48876ca1b669 | |
parent | check for too-small length in stream debug code (diff) | |
download | wireguard-openbsd-53e89f6a2725e525c0db1df5cc9321110aecf619.tar.xz wireguard-openbsd-53e89f6a2725e525c0db1df5cc9321110aecf619.zip |
Check getpass(3) return value. From Jared Yanovich <jjy2+ at pitt dot edu>
ok henning@
-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 { |