This commit is contained in:
AlbydS 2024-12-18 09:32:06 -05:00 committed by GitHub
commit ef355705d6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,6 +1,7 @@
#!/bin/bash #!/bin/sh
dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" # preload.sh - Test dynamically linked executables
[[ $LD_PRELOAD ]] && LD_PRELOAD+=" "
export LD_PRELOAD+="$dir/libhardened_malloc.so" [ -n "${LD_PRELOAD}" ] && LD_PRELOAD="${LD_PRELOAD} " # If LD_PRELOAD is already set, add a space.
exec "$@" export LD_PRELOAD="${LD_PRELOAD}${PWD}/out/libhardened_malloc.so" # Add the library to LD_PRELOAD.
exec "$@" # Run the command.