Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Mon, 17 Oct 2016 16:29:58 -0400
From: Rich Felker <>
Subject: Re: [PATCH] increase buffer size in getmntent to 4096 bytes

On Mon, Oct 17, 2016 at 02:48:17PM +0200, Natanael Copa wrote:
> On Mon, 17 Oct 2016 10:24:25 +0000
> Rostislav Skudnov <> wrote:
> > getmntent fails if the length of the mount entry exceeds the buffer
> > size. The new buffer size matches that of glibc.
> > ---
> > Even after this patch, getmntent may still fail since the device and mount
> > paths may be up to PATH_MAX in length, and the mount options may
> > (theoretically) have unlimited length. The same would happen in glibc, though.
> This patch solve the same problem, but uses getline to malloc the buffer as needed:

Indeed. We can't go making every program use an additional page of
memory just for a rare program that uses getmntent, so dynamic
allocation it had to be.


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.