summaryrefslogtreecommitdiff
path: root/tests/phdr-corruption.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/phdr-corruption.sh')
-rwxr-xr-xtests/phdr-corruption.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/phdr-corruption.sh b/tests/phdr-corruption.sh
index 4f6e901..274d6f1 100755
--- a/tests/phdr-corruption.sh
+++ b/tests/phdr-corruption.sh
@@ -15,7 +15,7 @@ cp "${SONAME}" "${SCRATCH}"
# Check for PT_PHDR entry VirtAddr corruption
readelfData=$(${READELF} -l "${SCRATCH_SO}" 2>&1)
-if [ "$(echo "$readelfData" | grep "PHDR" | wc -l)" != 1 ]; then
+if [ "$(echo "$readelfData" | grep -c "PHDR")" != 1 ]; then
# Triggered if PHDR errors appear on stderr
echo "ERROR: Unexpected number of occurences of PHDR in readelf results!"
exit 1