[PATCH] D59236: Fix git-llvm crashing when trying to remove directory while cleaning

Justin Lebar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 11 16:49:15 PDT 2019


jlebar added a comment.

Actually, I wonder if we should have some protections built in here, because e.g. if filename contains "/../../" we could end up rm'ing an arbitrary directory on the machine.

This was true before too, but now it's particularly scary that we're doing rmtree.

We could compute the absolute path to svn_repo and the absolute path to join(svn_repo, filename) and ensure that the first is a prefix of the second?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59236/new/

https://reviews.llvm.org/D59236





More information about the llvm-commits mailing list