aboutsummaryrefslogtreecommitdiffstats
path: root/main/truecrypt/flush-stdout.patch
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2017-03-10 14:15:46 +0200
committerTimo Teräs <timo.teras@iki.fi>2017-03-10 14:18:19 +0200
commit0c1e8d47e88197e564b3b77d5c3091e838c7a400 (patch)
tree677eb1889308fd52056cdb819065f635574715d8 /main/truecrypt/flush-stdout.patch
parent44aebd4a522b8f5af47f212181d7fdc9a0003025 (diff)
downloadaports-0c1e8d47e88197e564b3b77d5c3091e838c7a400.tar.bz2
aports-0c1e8d47e88197e564b3b77d5c3091e838c7a400.tar.xz
main/truecrypt: flush stdout before reading stdin
stdout is line-buffered, and needs to be flushed explicitly in musl. fixes #6992
Diffstat (limited to 'main/truecrypt/flush-stdout.patch')
-rw-r--r--main/truecrypt/flush-stdout.patch11
1 files changed, 11 insertions, 0 deletions
diff --git a/main/truecrypt/flush-stdout.patch b/main/truecrypt/flush-stdout.patch
new file mode 100644
index 0000000000..24809bae10
--- /dev/null
+++ b/main/truecrypt/flush-stdout.patch
@@ -0,0 +1,11 @@
+--- truecrypt-7.1a-source/Main/TextUserInterface.cpp.orig 2017-03-10 14:07:32.880449234 +0200
++++ truecrypt-7.1a-source/Main/TextUserInterface.cpp 2017-03-10 14:11:28.843128874 +0200
+@@ -1247,6 +1247,8 @@
+ if (!TextInputStream.get() || feof (stdin) || ferror (stdin))
+ throw UserAbort (SRC_POS);
+
++ wcout.flush();
++
+ line = TextInputStream->ReadLine();
+
+ if (ferror (stdin) || (line.empty() && feof (stdin)))