summaryrefslogtreecommitdiff
path: root/kerberosIV
diff options
context:
space:
mode:
Diffstat (limited to 'kerberosIV')
-rw-r--r--kerberosIV/register/register.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/kerberosIV/register/register.c b/kerberosIV/register/register.c
index 067cb2d404c..3928fefa9c2 100644
--- a/kerberosIV/register/register.c
+++ b/kerberosIV/register/register.c
@@ -1,4 +1,4 @@
-/* $Id: register.c,v 1.2 1996/04/17 07:23:33 tholo Exp $ */
+/* $Id: register.c,v 1.3 1996/09/04 05:10:23 deraadt Exp $ */
/*-
* Copyright (c) 1989, 1993
@@ -76,6 +76,7 @@ static char password[_PASSWORD_LEN];
void die();
void setup_key(), type_info(), cleanup();
+int
main(argc, argv)
int argc;
char **argv;
@@ -87,6 +88,7 @@ main(argc, argv)
int sock, llen;
u_char code;
static struct rlimit rl = { 0, 0 };
+ char passbuf[255];
signal(SIGPIPE, die);
@@ -170,11 +172,15 @@ main(argc, argv)
exit(1);
}
+ bzero(passbuf, sizeof passbuf);
+ bcopy(password, passbuf, sizeof password);
if (des_write(sock, password, 255) != 255) {
+ bzero(passbuf, sizeof passbuf);
perror("write password");
cleanup();
exit(1);
}
+ bzero(passbuf, sizeof passbuf);
/* get return message */
@@ -211,7 +217,7 @@ main(argc, argv)
void
cleanup()
{
- bzero(password, 255);
+ bzero(password, sizeof password);
}
extern char *crypt();