diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-08-18 18:56:40 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-08-18 18:56:40 +0000 |
commit | ec8051859453b9742fb11125329d2c5e3dc54eee (patch) | |
tree | 0af9a527d92ef615c1f56adea081fb1f956db5ea /libexec | |
parent | 2525d04dc2825b5c817a678b3f85884013343345 (diff) |
better handle things; spotted by millert
Diffstat (limited to 'libexec')
-rw-r--r-- | libexec/login_radius/raddauth.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libexec/login_radius/raddauth.c b/libexec/login_radius/raddauth.c index a819a3aa716..5cbaf948388 100644 --- a/libexec/login_radius/raddauth.c +++ b/libexec/login_radius/raddauth.c @@ -1,4 +1,4 @@ -/* $OpenBSD: raddauth.c,v 1.5 2001/08/18 18:31:21 deraadt Exp $ */ +/* $OpenBSD: raddauth.c,v 1.6 2001/08/18 18:56:39 deraadt Exp $ */ /*- * Copyright (c) 1996, 1997 Berkeley Software Design, Inc. All rights reserved. @@ -347,7 +347,8 @@ rad_request(pid_t id, char *name, char *password, int port, char *vector, *ptr++ = PW_PASSWORD; *ptr++ = p * AUTH_VECTOR_LEN + 2; - strlcpy(pass_buf, password, AUTH_PASS_LEN); /* must zero fill */ + memset(pass_buf, 0, sizeof(pass_buf)); /* must zero fill */ + strlcpy(pass_buf, password, sizeof(pass_buf)); /* Calculate the md5 digest */ secretlen = strlen(auth_secret); |