From b5cfd43deb5484146cf047ea33ac26273cc74564 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Mon, 26 Sep 2022 19:58:04 +0200 Subject: [PATCH] shadow: make the result of crypt() const This should not be free'd. --- shadow.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shadow.c b/shadow.c index c3e9286..b3f898a 100644 --- a/shadow.c +++ b/shadow.c @@ -81,7 +81,7 @@ void run_pw_backend_child(void) { break; } - char *c = crypt(buf, encpw); + const char *c = crypt(buf, encpw); password_buffer_destroy(buf, size); buf = NULL; @@ -100,4 +100,4 @@ void run_pw_backend_child(void) { clear_buffer(encpw, strlen(encpw)); exit(EXIT_SUCCESS); -} \ No newline at end of file +}