From: Andreas Ericsson Date: Mon, 11 Feb 2008 10:00:52 GMT Subject: Re: read_branches_file () Message-ID: <47B01CD4.4040004@op5.se> In-Reply-To: <20080208170305.069d43d2@pc09.procura.nl> H.Merijn Brand wrote: > - if (!f) > + if (stat (gp, &st_buf) || S_ISDIR (st_buf.st_mode)) Shouldn't this be if (stat(gp, &st_buf) || !S_ISREG(st_buf.st_mode)) ? Otherwise, you might end up opening a FIFO, a socket or a block/char special, which is obviously undesired. -- Andreas Ericsson andreas.ericsson@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231