Re: read_branches_file ()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux