VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2023-08-06 01:06:19 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2023-08-06 01:06:19 +0200
commitdab261c6941e1ee04d823effdf65784f1a554cb8 (patch)
treeb76b3fabdbcf80853122929622c57eecb5172c10 /src/Common
parent16bb1de3a6addec1c07b9ffc3fcd616744a3f15c (diff)
downloadVeraCrypt-dab261c6941e1ee04d823effdf65784f1a554cb8.tar.gz
VeraCrypt-dab261c6941e1ee04d823effdf65784f1a554cb8.zip
Linux: capture both stdout and stderr in popen call to avoid printing anything
If an error happens, error message will be read from popen pipe and so libpcsclite.so will not be found. This is the same outcome as when stdout is empty.
Diffstat (limited to 'src/Common')
-rw-r--r--src/Common/SCardLoader.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Common/SCardLoader.cpp b/src/Common/SCardLoader.cpp
index ff3c9100..16026e62 100644
--- a/src/Common/SCardLoader.cpp
+++ b/src/Common/SCardLoader.cpp
@@ -82,9 +82,9 @@ namespace VeraCrypt
string pcscPath = "";
FILE* pipe =
#ifdef TC_LINUX
- popen("ldconfig -p", "r");
+ popen("ldconfig -p 2>&1", "r");
#else
- popen("ldconfig -r", "r"); // FreeBSD
+ popen("ldconfig -r 2>&1", "r"); // FreeBSD
#endif
if (pipe)
{