From ebd4f7bcce6d48864187748ee5e20199ca55a76a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Fri, 20 May 2022 15:49:41 +0200 Subject: [PATCH] macOS: Ensure proper quoting when calling otool in objc_namespace script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pick-to: 6.2 6.3 5.15 Change-Id: I0c7fc40d321277103f6e80f221884cd87df6f930 Reviewed-by: Timur Pocheptsov Reviewed-by: Jörg Bornemann --- mkspecs/features/data/mac/objc_namespace.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mkspecs/features/data/mac/objc_namespace.sh b/mkspecs/features/data/mac/objc_namespace.sh index 5ce25900f06..abb173ef691 100755 --- a/mkspecs/features/data/mac/objc_namespace.sh +++ b/mkspecs/features/data/mac/objc_namespace.sh @@ -79,7 +79,7 @@ read_32bit_value() { otool_args= otool() { - command otool $otool_args $* + command otool $otool_args "$@" } declare -a extra_classnames_files @@ -197,13 +197,13 @@ if [ "${mach_header[0]}" != "MH_MAGIC_64" ]; then exit 1 fi -architectures=$(otool -f -v $target | grep architecture) +architectures=$(otool -f -v "$target" | grep architecture) setup_arch() { arch="$1" if [ ! -z "$arch" ]; then otool_args="-arch $arch" - offset=$(otool -f -v $target | grep -A 6 "architecture $arch" | grep offset) + offset=$(otool -f -v "$target" | grep -A 6 "architecture $arch" | grep offset) offset="${offset##*( )}" arch_offset="$(echo $offset | cut -d ' ' -f 2)" echo "🤖 Processing architecture '$arch' at offset $arch_offset..."