[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#17010: Bug#739752: coreutils: ln segfaults when run with --relative
From: |
Jim Meyering |
Subject: |
bug#17010: Bug#739752: coreutils: ln segfaults when run with --relative and an empty target |
Date: |
Thu, 13 Mar 2014 18:42:30 -0700 |
On Sat, Feb 22, 2014 at 1:57 AM, Erik Bernstein <address@hidden> wrote:
> Package: coreutils
> Version: 8.21-1
> Severity: normal
>
> Hi,
>
> when ln is run with --relative --symbolic and and empty string as the
> target, it ungracefully dies with a segmentation fault. The memory
> violation appears to happen in src/relpath.c:38 when the two input paths
> are checked for leading slashes:
>
> if ((path1[1] == '/') != (path2[1] == '/'))
>
> How to reproduce:
> [1] Open a terminal
> [2] run: ln -sr '' foobar
>
> Result: segmentation fault ln -sr '' foobar
> Expected result: Some kind of error message
...
Thank you for the bug report!
That also affected the very latest code in git.
Here is a patch:
k.txt
Description: Text document
- bug#17010: Bug#739752: coreutils: ln segfaults when run with --relative and an empty target,
Jim Meyering <=