From: Alejandro Colomar Date: Sat, 9 Aug 2025 15:53:26 +0000 (+0200) Subject: lib/agetpass.c: Pass "" instead of NULL as an ignored prompt X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3d5f1e88d5f0c4ed788c9e36207bfd65768bdee8;p=thirdparty%2Fshadow.git 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 --- 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