From d5ba1c03278eb079438bb038266d80d7477d49cb Mon Sep 17 00:00:00 2001 From: "jsg@openbsd.org" Date: Wed, 26 Feb 2020 13:40:09 +0000 Subject: upstream: change explicit_bzero();free() to freezero() While freezero() returns early if the pointer is NULL the tests for NULL in callers are left to avoid warnings about passing an uninitialised size argument across a function boundry. ok deraadt@ djm@ OpenBSD-Commit-ID: 2660fa334fcc7cd05ec74dd99cb036f9ade6384a --- auth2-passwd.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'auth2-passwd.c') diff --git a/auth2-passwd.c b/auth2-passwd.c index 6601e866..bb5f8192 100644 --- a/auth2-passwd.c +++ b/auth2-passwd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth2-passwd.c,v 1.17 2019/09/06 04:53:27 djm Exp $ */ +/* $OpenBSD: auth2-passwd.c,v 1.18 2020/02/26 13:40:09 jsg Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -66,8 +66,7 @@ userauth_passwd(struct ssh *ssh) logit("password change not supported"); else if (PRIVSEP(auth_password(ssh, password)) == 1) authenticated = 1; - explicit_bzero(password, len); - free(password); + freezero(password, len); return authenticated; } -- cgit v1.2.1