Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180430153112.GL1392@brightrain.aerifal.cx>
Date: Mon, 30 Apr 2018 11:31:12 -0400
From: Rich Felker <dalias@...c.org>
To: Patrick Oppenlander <patrick.oppenlander@...il.com>
Cc: musl@...ts.openwall.com
Subject: Re: Some questions

On Mon, Apr 30, 2018 at 03:29:39PM +1000, Patrick Oppenlander wrote:
> On Mon, Apr 30, 2018 at 1:16 PM, Rich Felker <dalias@...c.org> wrote:
> > On Mon, Apr 30, 2018 at 12:52:06PM +1000, Patrick Oppenlander wrote:
> >> - getcwd returned buffer size can be incorrect. If you call
> >> getcwd(NULL, 1234) the returned buffer is sized to match the path
> >> length but should be 1234 to be compatible with the glibc extension.
> >
> > I'll look at this. It seems like a worse behavior for most callers,
> > but maybe it should match.
> 
> Actually, my biggest issue with getcwd is that it allocates a PATH_MAX
> sized buffer on the stack. That's painful on deeply embedded stuff.

That's unrelated, and could/should be fixed by the attached patch I
think.

Rich

View attachment "getcwd-stack.diff" of type "text/plain" (377 bytes)

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.