From 1ac0cdca37dcaa073caebdccce58ff4c7f47f4ae Mon Sep 17 00:00:00 2001 From: madaidan <50278627+madaidan@users.noreply.github.com> Date: Sun, 30 May 2021 02:28:38 +0000 Subject: [PATCH 1/2] Remove unnecessary cat calls --- usr/bin/hardened-malloc-type-test | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr/bin/hardened-malloc-type-test b/usr/bin/hardened-malloc-type-test index 70d8defd..07fa8c8d 100755 --- a/usr/bin/hardened-malloc-type-test +++ b/usr/bin/hardened-malloc-type-test @@ -3,12 +3,12 @@ ## Copyright (C) 2020 - 2021 ENCRYPTED SUPPORT LP ## See the file COPYING for copying conditions. -if cat "/proc/$$/maps" | grep -q libhardened_malloc_kicksecure.so ; then +if grep -q "libhardened_malloc_kicksecure.so" "/proc/$$/maps"; then echo "kicksecure" exit 0 fi -if cat "/proc/$$/maps" | grep -q libhardened_malloc.so ; then +if grep -q "libhardened_malloc.so" "/proc/$$/maps"; then echo "original" exit 0 fi From fa66630cbb81e99cbfe34326bd14558cc26b8e97 Mon Sep 17 00:00:00 2001 From: madaidan <50278627+madaidan@users.noreply.github.com> Date: Sun, 30 May 2021 02:29:23 +0000 Subject: [PATCH 2/2] Remove unnecessary cat call --- usr/bin/hardened-malloc-enabled-test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr/bin/hardened-malloc-enabled-test b/usr/bin/hardened-malloc-enabled-test index b2af7bbd..e31e590f 100755 --- a/usr/bin/hardened-malloc-enabled-test +++ b/usr/bin/hardened-malloc-enabled-test @@ -3,7 +3,7 @@ ## Copyright (C) 2020 - 2021 ENCRYPTED SUPPORT LP ## See the file COPYING for copying conditions. -if cat "/proc/$$/maps" | grep -q libhardened_malloc ; then +if grep -q "libhardened_malloc" "/proc/$$/maps"; then echo "yes" exit 0 fi