From: Christian Göttsche Date: Sat, 17 Sep 2022 16:03:46 +0000 (+0200) Subject: lib: use memzero where applicable X-Git-Tag: 4.13~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e53db927af3735d5c628a7830b587a651bb803f;p=thirdparty%2Fshadow.git lib: use memzero where applicable Use memzero when operating in a buffer of known size to clear all bytes and avoid leaking the size of the stored data. --- diff --git a/src/sulogin.c b/src/sulogin.c index 08feade2f..2c5e09433 100644 --- a/src/sulogin.c +++ b/src/sulogin.c @@ -216,7 +216,7 @@ static void catch_signals (unused int sig) sleep (2); (void) puts (_("Login incorrect")); } - strzero (pass); + memzero (pass, sizeof pass); (void) alarm (0); (void) signal (SIGALRM, SIG_DFL); environ = newenvp; /* make new environment active */