From c618d6baac454feac8d09c0a307a5e70ae090326 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sat, 8 Feb 2020 18:57:57 +0000 Subject: [PATCH] uxpgnt --askpass: explicitly fflush(stdout) on exit. I'm not really sure why that's necessary: by my understanding of the C standard, it shouldn't be. But my observation is that when compiling with {Address,Leak} Sanitiser enabled, pageant --askpass can somehow manage to exit without having actually written the passphrase to its standard output. --- unix/uxpgnt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/unix/uxpgnt.c b/unix/uxpgnt.c index dbd52e24..7c0c474e 100644 --- a/unix/uxpgnt.c +++ b/unix/uxpgnt.c @@ -1192,6 +1192,8 @@ int main(int argc, char **argv) return 1; puts(passphrase); + fflush(stdout); + smemclr(passphrase, strlen(passphrase)); sfree(passphrase); return 0;