[PATCH] D19551: Handle Windows drive letters and ".." for --reproduce.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 26 12:45:31 PDT 2016


ruiu created this revision.
ruiu added a reviewer: davide.
ruiu added a subscriber: llvm-commits.

When --reproduce <path> is given, then we need to concatenate input
file paths to the given path to save input files to the directory.
Previously, path concatenation didn't handle Windows drive letters
so it could generate invalid paths such as "C:\D:\foo". It also didn't
handle ".." path components, so it could produce some bad paths
such as "foo/../../etc/passwd".

In this patch, Windows drive letters and ".." are removed before
concatenating paths.

http://reviews.llvm.org/D19551

Files:
  ELF/Driver.cpp
  test/ELF/reproduce.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19551.55070.patch
Type: text/x-patch
Size: 5125 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160426/7a2f9e4d/attachment.bin>


More information about the llvm-commits mailing list