diff options
author | Timo Teräs <timo.teras@iki.fi> | 2016-11-18 15:32:03 +0000 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2016-11-18 15:32:03 +0000 |
commit | f364a4d7430c1e6a4aa443d7316cc4fe0ede88a1 (patch) | |
tree | ee4303a94c060c274f30c35cc6476d59466d0e32 /main/truecrypt | |
parent | ec606a0582199dff8f92c22e2bfa5c77a55c5d61 (diff) | |
download | aports-f364a4d7430c1e6a4aa443d7316cc4fe0ede88a1.tar.bz2 aports-f364a4d7430c1e6a4aa443d7316cc4fe0ede88a1.tar.xz |
main/truecrypt: add gcc6 related fix
Diffstat (limited to 'main/truecrypt')
-rw-r--r-- | main/truecrypt/APKBUILD | 6 | ||||
-rw-r--r-- | main/truecrypt/fix-invalid-characters.patch | 54 |
2 files changed, 59 insertions, 1 deletions
diff --git a/main/truecrypt/APKBUILD b/main/truecrypt/APKBUILD index 535ff30296..0e260b0292 100644 --- a/main/truecrypt/APKBUILD +++ b/main/truecrypt/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=truecrypt pkgver=7.1a -pkgrel=1 +pkgrel=2 pkgdesc="crypto" url="http://www.truecrypt.org/" arch="all" @@ -14,6 +14,7 @@ install="" subpackages="" source="https://sources.archlinux.org/other/tc/truecrypt-${pkgver}.tar.gz https://sources.archlinux.org/other/tc/pkcs-2.20.tar.gz + fix-invalid-characters.patch truecrypt-arch-detection.patch execstack-fix.patch libdl.patch @@ -42,18 +43,21 @@ package() { md5sums="102d9652681db11c813610882332ae48 truecrypt-7.1a.tar.gz ce6a707b79411e82e8e558aa03e764b0 pkcs-2.20.tar.gz +d136d2e8a93c45740cfbb73819786966 fix-invalid-characters.patch 00ea70fa8437de877b31b027ac2b4060 truecrypt-arch-detection.patch 78e606e6582dacc3176d59ad4419b6bb execstack-fix.patch 11d7a8d9b83012750f0161f6116a9af8 libdl.patch 183b9bf04a943454d4e216130bcbac01 truecrypt.desktop" sha256sums="e6214e911d0bbededba274a2f8f8d7b3f6f6951e20f1c3a598fc7a23af81c8dc truecrypt-7.1a.tar.gz d2bf64094eec48b4695a15d91c05fe4469485a5cc6b0efc0ee75a20c095bd40d pkcs-2.20.tar.gz +b3bef13e9eb6090f5f98e9c1b54f3dd0c278de98642cac184131a63b4728672b fix-invalid-characters.patch a1e1307582c8d890d474dbf69656e1c1a51d57bba721c596986bfb34210be95e truecrypt-arch-detection.patch c5f437b173bc0abef978bbb160f53ca058469c696de1ce8968e3cef2d3640d79 execstack-fix.patch 8a8668080ae061eb31c859cfe7f596b5ed0d3911b9df1535a197a67900c6da62 libdl.patch c1ed83cf908780aa69a49f517b7336b5985c6ee38b067749272191a878a52923 truecrypt.desktop" sha512sums="b5e766023168015cb91bfd85c9e2621055dd98408215e02704775861b5070c5a0234a00c64c1bf7faa34e6d0b51ac71cd36169dd7a6f84d7a34ad0cfa304796a truecrypt-7.1a.tar.gz d69d90040da5bc93f91041ed9404f1614a3b1bdc8eddc2bbbd19367f12d2416a6f3af8b0071d77e1273d627148c63ebe7ebe332878fbe9adb8ae33dcc723f473 pkcs-2.20.tar.gz +da6a97ba4caa7b3e6455fa7f126282a5aa9bffb04d5cfd0f7e1358bf7177c68a4102632ae32121a670abe5bb63ab522e9c1bf8f0e7ad336954760089252f39d8 fix-invalid-characters.patch fac6963c65720f0b13486ff22bdcc2e31e78c39ede2b9561b2c4037ef2c0375f04c4d51dc6067c37aaeb664c3ed70e5747488389737c41807680750c26a8f084 truecrypt-arch-detection.patch a5d843a0eac7f14668e8c722a85ab8d871f64cf0488a9d9acd33235f077e74af3d191a3a6c18ddd25e8b487ef56b3afdbb6f3d7877113687a8101a1b855c366e execstack-fix.patch 83a8daefe3137581daab0aed599a9b47ec19a7403bdca424eb86fce482ddefb0a513ad18522a7d9b03d18fb771502ef378c76626521d8184c2e200e23d499737 libdl.patch diff --git a/main/truecrypt/fix-invalid-characters.patch b/main/truecrypt/fix-invalid-characters.patch new file mode 100644 index 0000000000..f8e54f31dc --- /dev/null +++ b/main/truecrypt/fix-invalid-characters.patch @@ -0,0 +1,54 @@ +From 646679da4d79bf7f8af22c44c7ae8498086a88a6 Mon Sep 17 00:00:00 2001 +From: Mounir IDRASSI <mounir.idrassi@idrix.fr> +Date: Fri, 18 Mar 2016 16:25:48 +0100 +Subject: [PATCH] Linux: Completely fix gcc-5 "Invalid characters encountered" + issue on mount. It was caused by an issue of gcc-5 STL implementation that is + causing char* pointers retrieved from std::string using c_str method to + become invalid in the child of a child process (after two fork calls). The + workaround is to first copy the std:string values in the child before calling + the second fork. + +--- + Platform/Unix/Process.cpp | 24 ++++++++++++++++++++++-- + 1 file changed, 22 insertions(+), 2 deletions(-) + +diff --git a/Platform/Unix/Process.cpp b/Platform/Unix/Process.cpp +index 388bda6..0770364 100644 +--- a/Platform/Unix/Process.cpp ++++ b/Platform/Unix/Process.cpp +@@ -53,13 +53,33 @@ namespace VeraCrypt + try + { + int argIndex = 0; ++ /* Workaround for gcc 5.X issue related to the use of STL (string and list) with muliple fork calls. ++ * ++ * The char* pointers retrieved from the elements of parameter "arguments" are no longer valid after ++ * a second fork is called. "arguments" was created in the parent of the current child process. ++ * ++ * The only solution is to copy the elements of "arguments" parameter in a local string array on this ++ * child process and then use char* pointers retrieved from this local copies before calling fork. ++ * ++ * gcc 4.x doesn't suffer from this issue. ++ * ++ */ ++ string argsCopy[array_capacity (args)]; + if (!execFunctor) +- args[argIndex++] = const_cast <char*> (processName.c_str()); ++ { ++ argsCopy[argIndex++] = processName; ++ } + + foreach (const string &arg, arguments) + { +- args[argIndex++] = const_cast <char*> (arg.c_str()); ++ argsCopy[argIndex++] = arg; + } ++ ++ for (int i = 0; i < argIndex; i++) ++ { ++ args[i] = const_cast <char*> (argsCopy[i].c_str()); ++ } ++ + args[argIndex] = nullptr; + + if (inputData) |