Andreas Gruenbacher 4e9269a5fc Make sure symlinks don't point outside working directory (CVE-2015-119)
When creating symlinks from git-style patches, make sure the symlinks don't
point above the current working directory.  Otherwise, a subsequent patch could
use the symlink to write outside the working directory.

* src/pch.c (symlink_target_is_valid): New function to check for valid symlink
targets.
* src/util.c (move_file): Use symlink_target_is_valid() here.
* tests/symlinks: Add valid and invalid symlink test cases.
2015-01-19 23:18:30 +01:00
..
2012-08-08 01:41:42 +02:00
2013-07-30 15:28:25 +02:00
2012-09-18 00:47:30 +02:00
2012-09-22 20:10:53 +02:00
2013-03-10 19:02:54 +01:00