From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/1554 Path: news.gmane.org!not-for-mail From: "Arvid E. Picciani" Newsgroups: gmane.linux.lib.musl.general Subject: getpwent.c: isn't line supposed to be set =?UTF-8?Q?NULL=3F?= Date: Mon, 13 Aug 2012 12:04:14 +0200 Message-ID: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1344852278 11679 80.91.229.3 (13 Aug 2012 10:04:38 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 13 Aug 2012 10:04:38 +0000 (UTC) To: Original-X-From: musl-return-1555-gllmg-musl=m.gmane.org@lists.openwall.com Mon Aug 13 12:04:39 2012 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1T0rVf-00037E-RE for gllmg-musl@plane.gmane.org; Mon, 13 Aug 2012 12:04:32 +0200 Original-Received: (qmail 32465 invoked by uid 550); 13 Aug 2012 10:04:30 -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 32457 invoked from network); 13 Aug 2012 10:04:30 -0000 X-Sender: aep@exys.org User-Agent: Roundcube Webmail/0.5.4 Xref: news.gmane.org gmane.linux.lib.musl.general:1554 Archived-At: the getpw* functions call getline in a dubious way for example: struct passwd *__getpwent_a(FILE *f, struct passwd *pw, char **line, size_t *size) [..] if ((l=getline(line, size, f)) < 0) { free(*line); *line = 0; is called from struct passwd *fgetpwent(FILE *f) [..] static char *line; return __getpwent_a(f, &pw, &line, &size); where line is uninitialized. first thing getdelim (forwarded from getline) does is: if (!*s) *n=0; so this looks wrong somewhere. maybe i'm just missing an =0 in between. -- Arvid E. Picciani