logo

checkpassword-ng

Uniform password checking interface for applications
commit: 615a8c07504c81773ade7a80ebb0eeed9f16bb35
parent 519f3fe765375af8b604334ef53b1f313221c726
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Mon,  2 Jan 2023 01:21:02 +0100

checkpassword.c: Fix memcpy checks

Diffstat:

Mcheckpassword.c4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/checkpassword.c b/checkpassword.c @@ -48,7 +48,7 @@ main(int argc, char *argv[]) char *buf = input; memcpy(username, buf, strlen(buf)); - if(username == NULL) + if(*username) { fprintf(stderr, "couldn't extract username, exiting...\n"); return ERR_MISUSED; @@ -56,7 +56,7 @@ main(int argc, char *argv[]) buf += strlen(buf) + 1; memcpy(password, buf, strlen(buf)); - if(password == NULL) + if(*password) { fprintf(stderr, "couldn't extract password, exiting...\n"); return ERR_MISUSED;