diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-09-04 05:10:24 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-09-04 05:10:24 +0000 |
commit | 9d710e408d6a50b64895641c8401f284906ea29f (patch) | |
tree | 4bf53a0d95561fc767fc3ec4f002a0ffbed7cfd3 /kerberosIV | |
parent | 7ca89df0f6fccfc79741fafc70e40a64756b7f9c (diff) |
_PASSWORD_LEN != 255
Diffstat (limited to 'kerberosIV')
-rw-r--r-- | kerberosIV/register/register.c | 10 |
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(); |