Merge 5c87c6bb2db55f1b2ce14bbd4b2318ffe963265a into c894f3ec1d78234657ae5f581abec16b5e518275

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)"
[[ $LD_PRELOAD ]] && LD_PRELOAD+=" "
export LD_PRELOAD+="$dir/libhardened_malloc.so"
exec "$@"
# preload.sh - Test dynamically linked executables
[ -n "${LD_PRELOAD}" ] && LD_PRELOAD="${LD_PRELOAD} " # If LD_PRELOAD is already set, add a space.
export LD_PRELOAD="${LD_PRELOAD}${PWD}/out/libhardened_malloc.so" # Add the library to LD_PRELOAD.
exec "$@" # Run the command.