From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/483 Path: news.gmane.org!not-for-mail From: Vasiliy Kulikov Newsgroups: gmane.linux.lib.musl.general Subject: musl bugs Date: Tue, 27 Sep 2011 20:06:46 +0400 Message-ID: <20110927160646.GA23877@albatros> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1317139673 21878 80.91.229.12 (27 Sep 2011 16:07:53 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 27 Sep 2011 16:07:53 +0000 (UTC) To: musl Original-X-From: musl-return-484-gllmg-musl=m.gmane.org@lists.openwall.com Tue Sep 27 18:07:50 2011 Return-path: Envelope-to: gllmg-musl@lo.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by lo.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1R8aCC-0004Gp-Rr for gllmg-musl@lo.gmane.org; Tue, 27 Sep 2011 18:07:48 +0200 Original-Received: (qmail 15956 invoked by uid 550); 27 Sep 2011 16:07:47 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 15948 invoked from network); 27 Sep 2011 16:07:47 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:date:from:to:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=hbrZnby6XFcSDK4paaR4VEH9V6QjxoPwn+A67mT9oGs=; b=lc7CRHbV4PxtA3TLB5+MsxshpLGPYCBhjTlp7qism5e2byfon3Hkfnfu9FLsAQ/jfp mfnWIxFHkm7MEtzObPdESfL82p6/pcRcYNhFtH9ozcesKZowz3PdrhB6fjhel7Id+96D cnFq+SEM+UDeJrPUyUPRhiy5MfvqAOubm3uQw= Original-Sender: Vasiliy Kulikov Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Xref: news.gmane.org gmane.linux.lib.musl.general:483 Archived-At: Hi Rich, getmntent_r(): - fgets() should be checked for too small buffer. - Looks like fgets() may fail. Then ferror() should be used together with feof(). getmntent(): - Is linebuf[256] big enough? IMO as the buffer is not supplied by a user, it should be dynamically allocated. Calling getmntent() and getting truncated result/ERANGE is somewhat not expected. addmntent(): - Here fseek() can be easily checked for errors => return 1 in case of error. hasmntopt(): - Implementation is wrong. The argument is not a substring, but a single option, possibly with "=value". Glibc's implementation is OK IMO. prctl() and other places: - Why no va_end()? It is __builtin_va_end() sometimes, and AFAIU it is not a noop. getgrgid() and getgrnam(): - errno is not saved while calling endgrent() (close() inside). POSIX says close() may return EIO if I/O error happened during close() with RO fd, altering errno. execvp(): - As the code chooses the first possible path in $PATH, the /usr/local/bin should be the last path. POSIX says it should start with null path (current dir), but it is crazy. - I don't see an overflow here (comment claims so)... -- Vasiliy