diff options
Diffstat (limited to 'tests/phdr-corruption.sh')
-rwxr-xr-x | tests/phdr-corruption.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/phdr-corruption.sh b/tests/phdr-corruption.sh index 1e62101..4f6e901 100755 --- a/tests/phdr-corruption.sh +++ b/tests/phdr-corruption.sh @@ -2,7 +2,7 @@ PATCHELF="../src/patchelf" SONAME="phdr-corruption.so" -SCRATCH="scratch/$(basename $0 .sh)" +SCRATCH="scratch/$(basename "$0" .sh)" SCRATCH_SO="${SCRATCH}/${SONAME}" READELF=${READELF:-readelf} @@ -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 --count "PHDR") != 1 ]; then +if [ "$(echo "$readelfData" | grep "PHDR" | wc -l)" != 1 ]; then # Triggered if PHDR errors appear on stderr echo "ERROR: Unexpected number of occurences of PHDR in readelf results!" exit 1 |