[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug w/ gawk stat extension

From: Andrew J. Schorr
Subject: Re: Bug w/ gawk stat extension
Date: Tue, 21 Jun 2005 08:47:08 -0400
User-agent: Mutt/1.4.1i

On Mon, Jun 20, 2005 at 03:10:22PM -0600, Glenn Zazulia wrote:
> Great!  I thought I'd also send another slight fix in the same 
> section of code:  pass in "sizeof buf - 1" to readlink() for the
> bufsize arg to save room for appending the trailing NULL character.
> This should prevent that fatal("size of symbolic link too big") failure
> case from ever occurring.  This is just a boundary case in sample
> extension code; so again, it's not a critical fix, but if you're
> already updating the filefuncs.c file with the other fix, you might
> as well include this too.  Attached is the complete patch, including
> both fixes.

But does it make sense to truncate the link value silently in that case?
Wouldn't it be better simply to omit the "linkval" field from the
array instead of returning an incorrect value?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]