diff options
author | Jim Meyering <meyering@fb.com> | 2014-03-13 17:05:04 -0700 |
---|---|---|
committer | Jim Meyering <meyering@fb.com> | 2014-03-13 20:05:10 -0700 |
commit | 0093ac8d57a0f1a16fd09d98f6a524dddb6053e7 (patch) | |
tree | be5995a36e912c3881b1651c1e1a420142129560 /NEWS | |
parent | 4f211822dddd1777dc915f2df4e2ed3b65c68301 (diff) | |
download | coreutils-0093ac8d57a0f1a16fd09d98f6a524dddb6053e7.tar.xz |
ln: with -sr, don't segfault for a TARGET of ''
Prior to this change, "ln -sr '' F" would segfault, attempting
to read path2[1] in relpath.c's path_common_prefix function.
This problem arises whenever canonicalize_filename_mode returns
NULL.
* src/ln.c (convert_abs_rel): Call relpath only when
both canonicalize_filename_mode calls return non-NULL.
* tests/ln/relative.sh: Add a test to trigger this failure.
* THANKS.in: List reporter's name/address.
* NEWS (Bug fixes): Mention it.
Reported by Erik Bernstein in 739752@bugs.debian.org.
Fixes http://bugs.gnu.org/17010.
Diffstat (limited to 'NEWS')
-rw-r--r-- | NEWS | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -25,6 +25,9 @@ GNU coreutils NEWS -*- outline -*- it would display an error, requiring --no-dereference to avoid the issue. [bug introduced in coreutils-5.3.0] + ln -sr '' F no longer segfaults. Now works as expected. + [bug introduced with the --relative feature in coreutils-8.16] + shuf --repeat no longer dumps core if the input is empty. [bug introduced with the --repeat feature in coreutils-8.22] |