From 3d5f1e88d5f0c4ed788c9e36207bfd65768bdee8 Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Sat, 9 Aug 2025 17:53:26 +0200 Subject: [PATCH] lib/agetpass.c: Pass "" instead of NULL as an ignored prompt This is safer, since in general, readpassphrase(3) does not accept a null pointer as input. This was discovered thanks to Chris Bazley's _Optional qualifier, which I'm testing at the moment. Signed-off-by: Alejandro Colomar --- lib/agetpass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/agetpass.c b/lib/agetpass.c index 36838cc5e..ae7354035 100644 --- a/lib/agetpass.c +++ b/lib/agetpass.c @@ -135,7 +135,7 @@ agetpass(const char *prompt) char * agetpass_stdin() { - return agetpass_internal(NULL, RPP_STDIN); + return agetpass_internal("", RPP_STDIN); } void -- 2.47.2