Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Tue, 8 Oct 2013 19:48:34 -0400
From: Rich Felker <dalias@...ifal.cx>
To: musl@...ts.openwall.com
Subject: Re: [PATCH] getcwd: Set errno to EINVAL when size == 0

On Mon, Oct 07, 2013 at 04:29:53PM -0700, Michael Forney wrote:
> On Mon, 07 Oct 2013 12:21:57 -0400, Rich Felker <dalias@...ifal.cx> wrote:
> > In principle the kernel should be generating the EINVAL if size is 0,
> > but maybe it does the wrong thing...?
> 
> Yeah, from what I could tell, it returns ERANGE in all cases where it
> can't fit the cwd into the buffer.

OK, I think that clears it up then. For now I'll apply your patch
(and at the same time, replace the if branch with a proper block
instead of the ugly comma operator hack) and we can worry about the
glibc issue later.

Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.