From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/10638 Path: news.gmane.org!.POSTED!not-for-mail From: Natanael Copa Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH] increase buffer size in getmntent to 4096 bytes Date: Mon, 17 Oct 2016 14:48:17 +0200 Message-ID: <20161017144817.299986f4@ncopa-desktop.copa.dup.pw> References: <1476699865-5593-1-git-send-email-rostislav@tuxera.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1476708541 5305 195.159.176.226 (17 Oct 2016 12:49:01 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 17 Oct 2016 12:49:01 +0000 (UTC) Cc: To: Rostislav Skudnov Original-X-From: musl-return-10651-gllmg-musl=m.gmane.org@lists.openwall.com Mon Oct 17 14:48:56 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1bw7LH-0006bv-L7 for gllmg-musl@m.gmane.org; Mon, 17 Oct 2016 14:48:35 +0200 Original-Received: (qmail 24354 invoked by uid 550); 17 Oct 2016 12:48:36 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 24331 invoked from network); 17 Oct 2016 12:48:35 -0000 In-Reply-To: <1476699865-5593-1-git-send-email-rostislav@tuxera.com> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.28; x86_64-alpine-linux-musl) Xref: news.gmane.org gmane.linux.lib.musl.general:10638 Archived-At: 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: http://www.openwall.com/lists/musl/2016/09/08/1 -nc