aboutsummaryrefslogtreecommitdiff
path: root/bin/ed
diff options
context:
space:
mode:
authorPedro F. Giffuni <pfg@FreeBSD.org>2016-05-20 19:10:29 +0000
committerPedro F. Giffuni <pfg@FreeBSD.org>2016-05-20 19:10:29 +0000
commitd972b6d256c6b4df99074ddcfadf44c337aba214 (patch)
tree97c673cab358ed23a2d8bc6c4f66b074ebdeeb8f /bin/ed
parentd28b40c8d9a22d135b2901e0bc0e9092fba2841e (diff)
Notes
Diffstat (limited to 'bin/ed')
-rw-r--r--bin/ed/cbc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/ed/cbc.c b/bin/ed/cbc.c
index 39857212830a..7869e96864e5 100644
--- a/bin/ed/cbc.c
+++ b/bin/ed/cbc.c
@@ -99,7 +99,7 @@ init_des_cipher(void)
/* initialize the padding vector */
for (i = 0; i < 8; i++)
- pvec[i] = (char) (arc4random() % 256);
+ pvec[i] = (char)arc4random_uniform(256);
#endif
}
@@ -164,7 +164,7 @@ get_keyword(void)
/*
* get the key
*/
- if (*(p = getpass("Enter key: "))) {
+ if ((p = getpass("Enter key: ")) != NULL && *p != '\0') {
/*
* copy it, nul-padded, into the key area