Commit 0190dfaf authored by Natanael Copa's avatar Natanael Copa

abuild: add safety check so we dont scan elfs outside our pkgdir

this is to catch bugs in abuild itself early
parent f43f6d31
......@@ -1039,13 +1039,21 @@ find_scanelf_paths() {
scan_shared_objects() {
local name="$1" controldir="$2" datadir="$3"
local opt=
local opt= i=
# allow spaces in paths
set -- $(find_scanelf_paths "$datadir")
unset IFS
# sanity check, verify that each path is prefixed with datadir
for i; do
if [ "${i#$datadir}" = "$i" ]; then
error "Internal error in scanelf paths"
return 1
if options_has "ldpath-recursive"; then
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment