Skip to content

Conversation

@codyps
Copy link
Contributor

@codyps codyps commented Feb 2, 2023

Otherwise, source file paths like ../../../../foo.c can result in writing $CARGO_TARGET_DIR/foo.o (or worse escapes into the wider filesystem).

This is a slightly more aggressive application of object path re-writing than strictly needed to ensure we don't have OUT_DIR escapes, but it should be perfectly effective.

…we keep inside the OUT_DIR

Otherwise, source file paths like `../../../../foo.c` can result in
writing `$CARGO_TARGET_DIR/foo.o`.

This is a slightly more aggressive application of object path re-writing
than strictly needed to ensure we don't have `OUT_DIR` escapes, but it
should be perfectly effective.
Copy link
Member

@thomcc thomcc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants