[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: a couple of glitches in 'ln'
From: |
Jim Meyering |
Subject: |
Re: a couple of glitches in 'ln' |
Date: |
Fri, 25 Jun 2004 09:14:36 +0200 |
Paul Eggert <address@hidden> wrote:
> While looking at some other things I noticed a couple of problems in
> 'ln'. First, there's a subscript error when the user invokes "ln foo
> ''": the code attempts to access the (-1)st or SIZE_MAXth byte in an
> empty string. Second, there's an unnecessary call to lstat -- at
> least, it appears to be unnecessary to me. Here's a patch.
>
> 2004-06-23 Paul Eggert <address@hidden>
>
> * src/ln.c (do_link): Remove unnecessary call to lstat.
> (main): Avoid subscript error when the destination is "".
>
Thank you!
I've applied that.