Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Jul 2000 01:10:04 -0700 (PDT)
From:      Gregory Bond <gnb@itga.com.au>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: misc/19975: fgets() and fread() on file without reading rights leads to SEGV 
Message-ID:  <200007170810.BAA54058@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR misc/19975; it has been noted by GNATS.

From: Gregory Bond <gnb@itga.com.au>
To: chucha@jam.tario.ru
Cc: freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: misc/19975: fgets() and fread() on file without reading rights leads to SEGV 
Date: Mon, 17 Jul 2000 18:02:17 +1000

 Read the man page for fopen().  It returns NULL if the file can't be opened.
 
 fread() (and fgets(), and even feof() etc) can only be used on valid
 filehandles.
 
 This PR can be closed.
 
 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200007170810.BAA54058>